forked from OSchip/llvm-project
Fix compiler error: init-statements in if/switch.
Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D131061
This commit is contained in:
parent
646e2f4803
commit
3e9e43b48e
|
@ -7315,8 +7315,8 @@ ScalarEvolution::getOperandsToCreate(Value *V, SmallVectorImpl<Value *> &Ops) {
|
|||
// CreateSCEV calls getNoWrapFlagsFromUB, which under certain conditions
|
||||
// requires a SCEV for the LHS.
|
||||
if (NewBO->Op && (NewBO->IsNSW || NewBO->IsNUW)) {
|
||||
if (auto *I = dyn_cast<Instruction>(NewBO->Op);
|
||||
I && programUndefinedIfPoison(I)) {
|
||||
auto *I = dyn_cast<Instruction>(NewBO->Op);
|
||||
if (I && programUndefinedIfPoison(I)) {
|
||||
Ops.push_back(BO->LHS);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue