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(
1160
1160
// Avoid constructing constant aggregate because constant value may expose
1161
1161
// more optimizations.
1162
1162
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 );
1165
1165
if (!isa<Constant>(Elt)) {
1166
1166
ConstAgg = false ;
1167
1167
break ;
@@ -1180,9 +1180,9 @@ Instruction *InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(
1180
1180
BasicBlock *Pred = It.first ;
1181
1181
Builder.SetInsertPoint (Pred, Pred->getTerminator ()->getIterator ());
1182
1182
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 );
1186
1186
}
1187
1187
1188
1188
It.second = V;
You can’t perform that action at this time.
0 commit comments