[llvm-bugs] [Bug 38708] New: Failure to get rid of `not` in ((1U << bits) - 1U) < val

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Aug 26 05:35:51 PDT 2018


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

            Bug ID: 38708
           Summary: Failure to get rid of `not` in  ((1U << bits) - 1U) <
                    val
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at lists.llvm.org

https://godbolt.org/z/thbdVP
https://rise4fun.com/Alive/XSc

Name: obvious
  %o0 = shl i32 -1, %y
  %o1 = xor i32 %o0, -1
  %r = icmp ult i32 %o1, %x
=>
  %n1 = shl i32 1, %y
  %r = icmp ule i32 %n1, %x

-- 
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/20180826/723337c0/attachment.html>


More information about the llvm-bugs mailing list