Fix PR5262: when folding select into PHI, make sure all operands are available
[oota-llvm.git] / lib / Transforms / Scalar / Reassociate.cpp
index 9160654c3d81187c59baba5deae0cb5a95e6f5a2..00d450812c050dfb7ec84d66d3238e0d7ee42b9e 100644 (file)
@@ -122,7 +122,7 @@ static bool isUnmovableInstruction(Instruction *I) {
   if (I->getOpcode() == Instruction::PHI ||
       I->getOpcode() == Instruction::Alloca ||
       I->getOpcode() == Instruction::Load ||
-      I->getOpcode() == Instruction::Malloc || isMalloc(I) ||
+      isMalloc(I) ||
       I->getOpcode() == Instruction::Invoke ||
       (I->getOpcode() == Instruction::Call &&
        !isa<DbgInfoIntrinsic>(I)) ||