https://bugs.llvm.org/show_bug.cgi?id=42195
Bug ID: 42195
Summary: roundf lowering under fast math
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: david.bolvan...@gmail.com
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
-Ofast -mfma -march=skylake
float rf(float B) {
return roundf(B);
}
Clang:
rf(float):
jmp roundf
GCC generates:
rf(float):
vmovaps xmm1, xmm0
vandps xmm0, xmm0, XMMWORD PTR .LC1[rip]
vorps xmm0, xmm0, XMMWORD PTR .LC0[rip]
vaddss xmm0, xmm0, xmm1
vroundss xmm0, xmm0, xmm0, 3
ret
ICC:
rf(float):
vxorps xmm1, xmm1, xmm1 #7.12
vmovss xmm3, xmm1, xmm0 #7.12
vandps xmm4, xmm3, XMMWORD PTR .L_2il0floatpacket.0[rip] #7.12
vcmpeqps xmm2, xmm4, XMMWORD PTR .L_2il0floatpacket.1[rip] #7.12
vroundps xmm9, xmm4, 0 #7.12
vxorps xmm11, xmm3, xmm4 #7.12
vblendvps xmm5, xmm9, XMMWORD PTR .L_2il0floatpacket.2[rip], xmm2 #7.12
vsubps xmm6, xmm4, xmm5 #7.12
vcmpeqps xmm7, xmm6, XMMWORD PTR .L_2il0floatpacket.3[rip] #7.12
vandps xmm8, xmm7, XMMWORD PTR .L_2il0floatpacket.4[rip] #7.12
vaddps xmm10, xmm8, xmm9 #7.12
vxorps xmm0, xmm10, xmm11 #7.12
ret
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs