llvm.org GIT mirror llvm / e177c9a
ConstantFoldInstOperands can theoretically return null if it didn't fold anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97049 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
42254225 }
42264226 }
42274227
4228 Constant *C;
4228 Constant *C = 0;
42294229 if (const CmpInst *CI = dyn_cast(I))
42304230 C = ConstantFoldCompareInstOperands(CI->getPredicate(),
42314231 Operands[0], Operands[1], TD);
42324232 else
42334233 C = ConstantFoldInstOperands(I->getOpcode(), I->getType(),
42344234 &Operands[0], Operands.size(), TD);
4235 return getSCEV(C);
4235 if (C)
4236 return getSCEV(C);
42364237 }
42374238 }
42384239