[PATCH] D42739: [InstCombine] allow multi-use values in canEvaluate* if all uses are in 1 inst

Amjad Aboud via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 5 07:41:45 PST 2018


aaboud added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp:189
+    Value *LHS, *RHS;
+    if (I->getOperand(0) == I->getOperand(1)) {
+      // Don't create an unnecessary value if the operands are repeated.
----------------
Sorry, I did not notice this before.
But should not we do the same check also for the "Select" and "PHI" below?
Could that be related to the infinite loop caused by this patch?


Repository:
  rL LLVM

https://reviews.llvm.org/D42739





More information about the llvm-commits mailing list