search for: unm9h7

Displaying 1 result from an estimated 1 matches for "unm9h7".

2017 Jul 01
8
[IR canonicalization] 6 ways to choose {-1,0,1}
...%7 } 6. Zexts and sub int neg101_cmp_sub(int x, int y) { return (x>y) - (x<y); } define i32 @neg101_cmp_sub(i32, i32) { %3 = icmp sgt i32 %0, %1 %4 = zext i1 %3 to i32 %5 = icmp slt i32 %0, %1 %6 = zext i1 %5 to i32 %7 = sub nsw i32 %4, %6 ret i32 %7 } https://godbolt.org/g/UnM9H7 Show these are logically equivalent: http://rise4fun.com/Alive/b4D Recent patch related to this pattern: https://reviews.llvm.org/D34278 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170701/ee76109b/attac...