We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 311d8fe commit fd20427Copy full SHA for fd20427
llvm/lib/Transforms/Utils/Evaluator.cpp
@@ -74,13 +74,12 @@ isSimpleEnoughValueToCommitHelper(Constant *C,
74
return true;
75
}
76
77
- if (isa<ConstantPtrAuth>(C))
78
- return false;
79
-
80
// We don't know exactly what relocations are allowed in constant expressions,
81
// so we allow &global+constantoffset, which is safe and uniformly supported
82
// across targets.
83
- ConstantExpr *CE = cast<ConstantExpr>(C);
+ ConstantExpr *CE = dyn_cast<ConstantExpr>(C);
+ if (!CE)
+ return false;
84
switch (CE->getOpcode()) {
85
case Instruction::BitCast:
86
// Bitcast is fine if the casted value is fine.
0 commit comments