# Diff Detail

Diff Detail

- Repository
- rG LLVM Github Monorepo

### Event Timeline

llvm/test/Transforms/InstCombine/icmp-of-xor-x.ll | ||
---|---|---|

42 | Commute x and y on this instruction, so the test is not relying on another transform to get to canonical form. | |

72 | Commute x and y on this instruction, so the test is not relying on another transform to get to canonical form. | |

73 | This test is covering the same pattern (although with different types and predicate) as "xor_ule_2". We can add an instruction to make sure the operands don't get commuted, and the test provides the coverage we want: define i1 @xor_sge(i8 %xx, i8 %yy) { %x = mul i8 %xx, %xx ; thwart complexity-based canonicalization %y = or i8 %yy, 128 %xor = xor i8 %y, %x ; both ops are binops, so they won't commute %r = icmp sge i8 %x, %xor ; both ops are binops, so they won't commute ret i1 %r } |