[PATCH] D114339: [InstCombine] simplify (~A | B) ^ A --> ~( A & B)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 22 08:09:07 PST 2021
spatel added a subscriber: rampitec.
spatel added a comment.
1. Please commit the baseline tests, so we see diffs here.
2. I expect that will show that the commuted variations are not testing what they claim to be testing (you'll need to add instructions to prevent commuting).
3. Please add tests with extra uses - since we're creating 2 instructions, the fold should be good as long as any one of the intermediate values can be eliminated (has one use).
Side note: @rampitec recently added a matcher that takes a binary opcode as an input. It probably doesn't make sense here, but it's something to think about if we're trying to make logic folds more regular/predictable ('DeMorganize' folds so we handle patterns where 'and' and 'or' operations are swapped).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114339/new/
https://reviews.llvm.org/D114339
More information about the llvm-commits
mailing list