Displaying 1 result from an estimated 1 matches for "xor_of_icmps_canon".
2017 May 19
5
[llvm] r303387 - [InstCombine] add more tests for xor-of-icmps; NFC
...eport with a perf regression that was root caused to this
IR:
define i1 @xor_of_icmps(i64 %a) {
%b = icmp sgt i64 %a, 0
%c = icmp eq i64 %a, 1
%r = xor i1 %b, %c
ret i1 %r
}
Because this was a regression, we know that the optimal/canonical IR for
this program is:
define i1 @xor_of_icmps_canonical(i64 %a) {
%r = icmp sgt i64 %a, 1
ret i1 %r
}
2. I saw this as a bug in InstCombine because I think InstCombine's job is
to canonicalize simple IR sequences.
3. I assumed that matching an (xor icmp, icmp) pattern can be done
efficiently in InstCombine. In fact, I knew that we a...