Skip to content

Commit 91a74c8

Browse files
committed
[NFC] Address review comments: fix misprint + use C++17 struct binding
1 parent 6cbe171 commit 91a74c8

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,15 +1391,11 @@ void Vectorizer::mergeEquivalenceClasses(EquivalenceClassMap &EQClasses) const {
13911391

13921392
// For each item in RedKeyToUOMap, if it has more than one underlying object,
13931393
// try to merge the equivalence classes.
1394-
for (auto &RedKeyToUO : RedKeyToUOMap) {
1395-
auto UObjects = RedKeyToUO.second;
1394+
for (auto &[RedKey, UObjects] : RedKeyToUOMap) {
13961395
if (UObjects.size() < 2)
13971396
continue;
1398-
const auto RedKey = RedKeyToUO.first;
13991397
auto UTMap = GetUltimateTargets(UObjects);
1400-
for (const auto &UT : UTMap) {
1401-
const Value *UObject = UT.first;
1402-
const Value *UltimateTarget = UT.second;
1398+
for (const auto &[UObject, UltimateTarget] : UTMap) {
14031399
if (UObject == UltimateTarget)
14041400
continue;
14051401

llvm/test/Transforms/LoadStoreVectorizer/X86/massive_indirection.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
; common underlying object deeper than 6 levels from the original pointer.
88

99
; The test below is the simplified version of actual performance oriented
10-
; workload; the offsets in getelementptr instructins are similar or same for
10+
; workload; the offsets in getelementptr instructions are similar or same for
1111
; the test simplicity.
1212

1313
define void @v1_v2_v4_v1_to_v8_levels_6_7_8_8(i32 %arg0, ptr align 16 %arg1) {

0 commit comments

Comments
 (0)