[PATCH] D44626: [InstCombine] Fold (A OR B) AND B code sequence over Phi node

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 19 12:07:11 PDT 2018


efriedma added a comment.

Missing testcase.



================
Comment at: lib/Transforms/InstCombine/InstCombinePHI.cpp:669
+      InsertNewInstBefore(NewPhi, Phi);
+      cast<Instruction>(User)->setOperand(0, NewPhi);
+    }
----------------
In general, instcombine should not insert new instructions without erasing any existing instructions; in some cases, we'll increase codesize without any benefit.


https://reviews.llvm.org/D44626





More information about the llvm-commits mailing list