https://bugs.llvm.org/show_bug.cgi?id=43261
Bug ID: 43261
Summary: [InstCombine] Failure to simplify 2 icmp and select
after rL369840
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: denis.bakhva...@intel.com
CC: llvm-bugs@lists.llvm.org
Before rL369840 we simplified the following case:
%tmp = add i32 %i, -3
%tmp1 = icmp ult i32 %tmp, 2
%cmp2 = icmp eq i32 %i, 5
%phitmp = zext i1 %cmp2 to i32
%tmp2 = select i1 %tmp1, i32 1, i32 %phitmp
to
%tmp = add i32 %i, -3
%0 = icmp ult i32 %tmp, 3
%tmp2 = zext i1 %0 to i32
Proof: https://rise4fun.com/Alive/dhoe
There were 4 steps of simplification:
step1&2: https://rise4fun.com/Alive/82o
step3&4: https://rise4fun.com/Alive/Izp
After rL369840 we invert the first comparison (icmp ult -> ugt, as a result of
tryToReuseConstantFromSelectInComparison() ) and instcombine takes another
route.
I'm not sure if it is a duplicate of recently created bug for InstCombine.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs