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

            Bug ID: 44754
           Summary: [InstCombine] ashr+and+icmp not simplified
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

define i1 @foo(i32 %a) {
  %ashr = ashr i32 %a, 5
  %and = and i32 %ashr, -2
  %cmp = icmp slt i32 %and, 1
  ret i1 %cmp
}

is not simplified to

define i1 @foo(i32 %a) {
  %and2 = and i32 %a, -64
  %cmp = icmp slt i32 %and2, 32
  ret i1 %cmp
}

but could be (https://rise4fun.com/Alive/FkZq).

Encountered this as fallout from a worklist order change in
test/Transforms/InstCombine/pr17827.ll.

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

Reply via email to