[PATCH] D20847: BitCast infinite loop fix
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 12:34:50 PDT 2016
majnemer added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:1816-1825
@@ +1815,12 @@
+ bool Store = false;
+ for (User *U : PN->users()) {
+ auto *SI = dyn_cast<StoreInst>(U);
+ if (SI && SI->isSimple() && SI->getOperand(0) == PN)
+ Store = true;
+ }
+ for (User *U : CI.users()) {
+ auto *SI = dyn_cast<StoreInst>(U);
+ if (SI && SI->isSimple() && SI->getOperand(0) == &CI && Store)
+ return nullptr;
+ }
+
----------------
Could a problem arise if this phi was used by a phi?
Repository:
rL LLVM
http://reviews.llvm.org/D20847
More information about the llvm-commits
mailing list