https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98124
Bug ID: 98124
Summary: Z: Load and test LTDBR instruction gets not used for
comparison against 0.0
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: ---
#include <math.h>
double sign(double in)
{
return in == 0.0 ? 0.0 : copysign(1.0, in);
}
Command line:
gcc m64 -O2 -save-temps copysign.C
Output:
_Z4signd:
.LFB234:
.cfi_startproc
larl %r5,.L8
lzdr %f2
cdbr %f0,%f2
je .L6
ld %f2,.L9-.L8(%r5)
cpsdr %f0,%f0,%f2
br %r14
Use of LTDBR expected instead of lzdr %f2 + cdbr %f0,%f2