[PATCH] D36505: [InstCombine] Make (X|C1)^C2 -> X^(C1^C2) iff X&~C1 == 0 work for splat vectors

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 22:12:31 PDT 2017


craig.topper created this revision.

This also corrects the description to match what was actually implemented. The old comment said X^(C1|C2), but it implemented X^((C1|C2)&~(C1&C2)).  I believe ((C1|C2)&~(C1&C2)) is equivalent to (C1^C2).


https://reviews.llvm.org/D36505

Files:
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  test/Transforms/InstCombine/or.ll
  test/Transforms/InstCombine/select-with-bitwise-ops.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36505.110326.patch
Type: text/x-patch
Size: 4891 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170809/8f42b792/attachment.bin>


More information about the llvm-commits mailing list