[PATCH] D16978: [InstCombine] Try harder to simplify ~(X & Y) -> ~X | ~Y and ~(X | Y) -> ~X & ~Y when X and Y have more than one uses.

Balaram Makam via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 12:43:49 PDT 2016


bmakam marked an inline comment as done.

================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1374-1375
@@ +1373,4 @@
+
+  for (auto *InvertedUse : UserInsts) {
+    Instruction *NewI = Inst->clone();
+    NewI->setName(Inst->getName() + ".invert");
----------------
Thanks David, I have simplified it to a range-based for loop.


http://reviews.llvm.org/D16978





More information about the llvm-commits mailing list