[PATCH] D35451: [InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases where one side doesn't simplify, but the other side resolves to an identity value

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 15 00:05:56 PDT 2017


craig.topper created this revision.

If one side simplifies to the identity value for inner opcode, we can replace the value with just the operation that can't be simplified.

I've removed a couple now unneeded special cases in visitAnd and visitOr. There are probably other cases I missed.

@spatel I believe this fixes your hidden not test cases with compares. If you send over your test cases I can add them to this patch.


https://reviews.llvm.org/D35451

Files:
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35451.106755.patch
Type: text/x-patch
Size: 4976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170715/2c407714/attachment.bin>


More information about the llvm-commits mailing list