File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1160,8 +1160,8 @@ Instruction *InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(
11601160 // Avoid constructing constant aggregate because constant value may expose
11611161 // more optimizations.
11621162 bool ConstAgg = true ;
1163- for (auto I : enumerate(AggElts)) {
1164- Value *Elt = (*I. value () )->DoPHITranslation (UseBB, It.first );
1163+ for (auto [Idx, Val] : enumerate(AggElts)) {
1164+ Value *Elt = (*Val )->DoPHITranslation (UseBB, It.first );
11651165 if (!isa<Constant>(Elt)) {
11661166 ConstAgg = false ;
11671167 break ;
@@ -1180,9 +1180,9 @@ Instruction *InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(
11801180 BasicBlock *Pred = It.first ;
11811181 Builder.SetInsertPoint (Pred, Pred->getTerminator ()->getIterator ());
11821182 Value *V = PoisonValue::get (AggTy);
1183- for (auto I : enumerate(AggElts)) {
1184- Value *Elt = (*I. value () )->DoPHITranslation (UseBB, Pred);
1185- V = Builder.CreateInsertValue (V, Elt, I. index () );
1183+ for (auto [Idx, Val] : enumerate(AggElts)) {
1184+ Value *Elt = (*Val )->DoPHITranslation (UseBB, Pred);
1185+ V = Builder.CreateInsertValue (V, Elt, Idx );
11861186 }
11871187
11881188 It.second = V;
You can’t perform that action at this time.
0 commit comments