https://bugs.llvm.org/show_bug.cgi?id=32791
Bug ID: 32791
Summary: [InstCombine] fold or-of-selects with inverted
predicates and zero operands
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: spatel+l...@rotateright.com
CC: llvm-bugs@lists.llvm.org
This is a variation of an existing regression test in
test/Transforms/InstCombine/logical-select.ll:
define i32 @poo(i32 %a, i32 %b, i32 %c, i32 %d) {
%cmp1 = icmp slt i32 %a, %b
%sel1 = select i1 %cmp1, i32 %c, i32 0
%cmp2 = icmp sge i32 %a, %b
%sel2 = select i1 %cmp2, i32 %d, i32 0
%or = or i32 %sel1, %sel2
ret i32 %or
}
We should recognize the inverted predicates and disguised 'and' ops and fold
this to:
%cmp = icmp slt i32 %a, %b
%sel = select i1 %cmp, i32 %c, i32 %d
--
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