[PATCH] D45663: [InstCombine][NFC] Add tests for variable mask canonicalization in masked merge

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 15 03:11:06 PDT 2018


lebedev.ri created this revision.
lebedev.ri added a dependent revision: D45664: [InstCombine] Canonicalize variable mask in masked merge .

Masked merge has a pattern of: `((x ^ y) & M) ^ y`.
But, there is no difference between `((x ^ y) & M) ^ y` and `((x ^ y) & ~M) ^ x`,
We should canonicalize it and drop that `xor`.


Repository:
  rL LLVM

https://reviews.llvm.org/D45663

Files:
  test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-scalar.ll
  test/Transforms/InstCombine/invert-variable-mask-in-masked-merge-vector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45663.142545.patch
Type: text/x-patch
Size: 15798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180415/f226fcd6/attachment.bin>


More information about the llvm-commits mailing list