summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 83f087f487b..91e625b7aac 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1419,10 +1419,10 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) {
// Shifting by the bitwidth or more is undefined.
if (Op1LV.isConstant()) {
- auto *ShiftAmt = Op1LV.getConstantInt();
- if (ShiftAmt->getLimitedValue() >=
- ShiftAmt->getType()->getScalarSizeInBits())
- break;
+ if (auto *ShiftAmt = Op1LV.getConstantInt())
+ if (ShiftAmt->getLimitedValue() >=
+ ShiftAmt->getType()->getScalarSizeInBits())
+ break;
}
// undef >>a X -> all ones
@@ -1436,10 +1436,10 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) {
// Shifting by the bitwidth or more is undefined.
if (Op1LV.isConstant()) {
- auto *ShiftAmt = Op1LV.getConstantInt();
- if (ShiftAmt->getLimitedValue() >=
- ShiftAmt->getType()->getScalarSizeInBits())
- break;
+ if (auto *ShiftAmt = Op1LV.getConstantInt())
+ if (ShiftAmt->getLimitedValue() >=
+ ShiftAmt->getType()->getScalarSizeInBits())
+ break;
}
// undef << X -> 0
OpenPOWER on IntegriCloud