[llvm-bugs] [Bug 44622] New: fneg (xor X -2147483648) -> X fold is missing in IR

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jan 22 07:29:59 PST 2020


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

            Bug ID: 44622
           Summary: fneg (xor X -2147483648) -> X fold is missing in IR
           Product: new-bugs
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Keywords: code-quality
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: nok.raven at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

define float @foo(float %0) {
  %2 = fneg float %0
  %3 = bitcast float %2 to i32
  %4 = xor i32 %3, -2147483648
  %5 = bitcast i32 %4 to float
  %6 = fneg float %5
  %7 = bitcast float %6 to i32
  %8 = xor i32 %7, -2147483648
  %9 = bitcast i32 %8 to float
  ret float %9
}

Adding fast flag to fneg does not help.

https://godbolt.org/z/o9WQYp

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200122/ce773d98/attachment.html>


More information about the llvm-bugs mailing list