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: unassignedb...@nondot.org
          Reporter: lebedev...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to