https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93571
Bug ID: 93571
Summary: PPC: fmr gets used instead of faster xxlor
Product: gcc
Version: 8.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jens.seifert at de dot ibm.com
Target Milestone: ---
fmr is a 6 cycle instruction on Power8. Why is gcc not using the 2 cycle xxlor
instruction )
Input:
double setflm(double x)
{
double r = __builtin_mffs();
__builtin_mtfsf(0xFF, x);
return r;
}
Command line:
gcc -maix64 -O2 -save-temps flm.C -mcpu=power8
Output:
._Z6setflmd:
LFB..0:
mffs 0
mtfsf 255,1
fmr 1,0
blr