https://bugs.llvm.org/show_bug.cgi?id=39535

            Bug ID: 39535
           Summary: missing float optimization
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

float test(float x)
{
        return x ? 0 : x;
}

produces:
  vxorps xmm1, xmm1, xmm1
  vcmpeqss xmm1, xmm0, xmm1
  vandps xmm0, xmm1, xmm0

gcc and icc give:
  vxorps xmm0, xmm0, xmm0

https://gcc.godbolt.org/z/SA0HsT

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to