Skip to content

Commit 594d033

Browse files
Address comments
1 parent 212f64c commit 594d033

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

llvm/unittests/Transforms/Vectorize/SandboxVectorizer/SeedCollectorTest.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ define void @foo(ptr noalias %ptr, <2 x float> %val0) {
486486
%r1 = load <2 x float>, ptr %ptr1
487487
%r2 = load atomic i64, ptr %ptr0 unordered, align 8
488488
%r3 = load volatile i64, ptr %ptr1
489+
%r4 = load void()*, ptr %ptr1
489490
490491
ret void
491492
}
@@ -504,16 +505,17 @@ define void @foo(ptr noalias %ptr, <2 x float> %val0) {
504505
auto BB = F.begin();
505506
sandboxir::SeedCollector SC(&*BB, SE);
506507

507-
// Find the stores
508+
// Find the loads
508509
auto It = std::next(BB->begin(), 2);
509510
// StX with X as the order by offset in memory
510-
auto *Ld0 = &*It++;
511-
auto *Ld1 = &*It++;
511+
auto *Ld0 = cast<sandboxir::LoadInst>(&*It++);
512+
auto *Ld1 = cast<sandboxir::LoadInst>(&*It++);
512513

513514
auto LoadSeedsRange = SC.getLoadSeeds();
514-
EXPECT_EQ(range_size(LoadSeedsRange), 1u);
515+
EXPECT_EQ(range_size(LoadSeedsRange), 2u);
515516
auto &SB = *LoadSeedsRange.begin();
516-
// isValidMemSeed check: The atomic and volatile stores should not
517-
// be included in the bundle, but the vector stores should be.
517+
// isValidMemSeed check: The atomic and volatile loads should not
518+
// be included in the bundle, the vector stores should be, but the
519+
// void-typed load should not.
518520
ExpectThatElementsAre(SB, {Ld0, Ld1});
519521
}

0 commit comments

Comments
 (0)