Skip to content

Conversation

@mjbedy
Copy link
Contributor

@mjbedy mjbedy commented Nov 13, 2025

No description provided.

@github-actions
Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Nov 13, 2025

@llvm/pr-subscribers-vectorizers

Author: Michael Bedy (mjbedy)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/167929.diff

2 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+18-1)
  • (added) llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll (+82)
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index cc53b0dd3577e..e67e607ee1632 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -21623,6 +21623,17 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
       }
     }
 
+    // Helper to detect loads marked with !invariant.load metadata. Such loads
+    // are defined to read from memory that never changes for the lifetime of
+    // the program; any store to the same location would be UB. Therefore we
+    // can conservatively treat an invariant load and any store as non-aliasing
+    // for scheduling/dep purposes and skip creating a dependency edge.
+    auto IsInvariantLoad = [](const Instruction *I) {
+      if (const auto *LI = dyn_cast<LoadInst>(I))
+        return LI->getMetadata(LLVMContext::MD_invariant_load) != nullptr;
+      return false;
+    };
+
     // Handle the memory dependencies (if any).
     ScheduleData *NextLoadStore = BundleMember->getNextLoadStore();
     if (!NextLoadStore)
@@ -21636,10 +21647,15 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
     unsigned DistToSrc = 1;
     bool IsNonSimpleSrc = !SrcLoc.Ptr || !isSimple(SrcInst);
 
+    if (IsInvariantLoad(SrcInst))
+      return; // Invariant load cannot have memory dependencies.
+
     for (ScheduleData *DepDest = NextLoadStore; DepDest;
          DepDest = DepDest->getNextLoadStore()) {
       assert(isInSchedulingRegion(*DepDest) && "Expected to be in region");
 
+      Instruction *DestInst = DepDest->getInst();
+
       // We have two limits to reduce the complexity:
       // 1) AliasedCheckLimit: It's a small limit to reduce calls to
       //    SLP->isAliased (which is the expensive part in this loop).
@@ -21648,7 +21664,8 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
       //    It's important for the loop break condition (see below) to
       //    check this limit even between two read-only instructions.
       if (DistToSrc >= MaxMemDepDistance ||
-          ((SrcMayWrite || DepDest->getInst()->mayWriteToMemory()) &&
+          (!IsInvariantLoad(DestInst) && // Cannot have memory deps.
+           (SrcMayWrite || DepDest->getInst()->mayWriteToMemory()) &&
            (IsNonSimpleSrc || NumAliased >= AliasedCheckLimit ||
             SLP->isAliased(SrcLoc, SrcInst, DepDest->getInst())))) {
 
diff --git a/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll b/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll
new file mode 100644
index 0000000000000..00bd0feb8c0fa
--- /dev/null
+++ b/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll
@@ -0,0 +1,82 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -passes="function(slp-vectorizer)" -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 %s -S | FileCheck %s
+
+define void @test(ptr addrspace(1) %base, ptr addrspace(1) %otherA, ptr addrspace(1) %otherB) #0 {
+; CHECK-LABEL: define void @test(
+; CHECK-SAME: ptr addrspace(1) [[BASE:%.*]], ptr addrspace(1) [[OTHERA:%.*]], ptr addrspace(1) [[OTHERB:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[P0:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 0
+; CHECK-NEXT:    [[A0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 0
+; CHECK-NEXT:    [[B0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 0
+; CHECK-NEXT:    [[TMP0:%.*]] = load <2 x half>, ptr addrspace(1) [[A0PTR]], align 2, !invariant.load [[META0:![0-9]+]]
+; CHECK-NEXT:    [[TMP1:%.*]] = load <2 x half>, ptr addrspace(1) [[B0PTR]], align 2, !invariant.load [[META0]]
+; CHECK-NEXT:    [[TMP2:%.*]] = fadd reassoc <2 x half> [[TMP0]], [[TMP1]]
+; CHECK-NEXT:    store <2 x half> [[TMP2]], ptr addrspace(1) [[P0]], align 2
+; CHECK-NEXT:    ret void
+;
+entry:
+  %p0 = getelementptr half, ptr addrspace(1) %base, i32 0
+  %p1 = getelementptr half, ptr addrspace(1) %base, i32 1
+  ; First pair of invariant loads from otherA.
+  %A0PTR = getelementptr half, ptr addrspace(1) %otherA, i32 0
+  %B0PTR = getelementptr half, ptr addrspace(1) %otherB, i32 0
+  %A0 = load half, ptr addrspace(1) %A0PTR, align 2, !invariant.load !0
+  %B0 = load half, ptr addrspace(1) %B0PTR, align 2, !invariant.load !0
+  %add0 = fadd reassoc half %A0, %B0
+  store half %add0, ptr addrspace(1) %p0, align 2
+  %A1PTR = getelementptr half, ptr addrspace(1) %otherA, i32 1
+  %B1PTR = getelementptr half, ptr addrspace(1) %otherB, i32 1
+  %A1 = load half, ptr addrspace(1) %A1PTR, align 2, !invariant.load !0
+  %B1 = load half, ptr addrspace(1) %B1PTR, align 2, !invariant.load !0
+  %add1 = fadd reassoc half %A1, %B1
+  store half %add1, ptr addrspace(1) %p1, align 2
+  ret void
+}
+
+
+define void @aliastest(ptr addrspace(1) %base, ptr addrspace(1) %otherA, ptr addrspace(1) %otherB) #0 {
+; CHECK-LABEL: define void @aliastest(
+; CHECK-SAME: ptr addrspace(1) [[BASE:%.*]], ptr addrspace(1) [[OTHERA:%.*]], ptr addrspace(1) [[OTHERB:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[P0:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 0
+; CHECK-NEXT:    [[P1:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 1
+; CHECK-NEXT:    [[A0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 0
+; CHECK-NEXT:    [[B0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 0
+; CHECK-NEXT:    [[A0:%.*]] = load half, ptr addrspace(1) [[A0PTR]], align 2
+; CHECK-NEXT:    [[B0:%.*]] = load half, ptr addrspace(1) [[B0PTR]], align 2
+; CHECK-NEXT:    [[ADD0:%.*]] = fadd reassoc half [[A0]], [[B0]]
+; CHECK-NEXT:    store half [[ADD0]], ptr addrspace(1) [[P0]], align 2
+; CHECK-NEXT:    [[A1PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 1
+; CHECK-NEXT:    [[B1PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 1
+; CHECK-NEXT:    [[A1:%.*]] = load half, ptr addrspace(1) [[A1PTR]], align 2
+; CHECK-NEXT:    [[B1:%.*]] = load half, ptr addrspace(1) [[B1PTR]], align 2
+; CHECK-NEXT:    [[ADD1:%.*]] = fadd reassoc half [[A1]], [[B1]]
+; CHECK-NEXT:    store half [[ADD1]], ptr addrspace(1) [[P1]], align 2
+; CHECK-NEXT:    ret void
+;
+entry:
+  %p0 = getelementptr half, ptr addrspace(1) %base, i32 0
+  %p1 = getelementptr half, ptr addrspace(1) %base, i32 1
+  ; First pair of invariant loads from otherA.
+  %A0PTR = getelementptr half, ptr addrspace(1) %otherA, i32 0
+  %B0PTR = getelementptr half, ptr addrspace(1) %otherB, i32 0
+  %A0 = load half, ptr addrspace(1) %A0PTR, align 2
+  %B0 = load half, ptr addrspace(1) %B0PTR, align 2
+  %add0 = fadd reassoc half %A0, %B0
+  store half %add0, ptr addrspace(1) %p0, align 2
+  %A1PTR = getelementptr half, ptr addrspace(1) %otherA, i32 1
+  %B1PTR = getelementptr half, ptr addrspace(1) %otherB, i32 1
+  %A1 = load half, ptr addrspace(1) %A1PTR, align 2
+  %B1 = load half, ptr addrspace(1) %B1PTR, align 2
+  %add1 = fadd reassoc half %A1, %B1
+  store half %add1, ptr addrspace(1) %p1, align 2
+  ret void
+}
+
+
+attributes #0 = { nounwind }
+
+!0 = !{}
+;.
+; CHECK: [[META0]] = !{}
+;.

@llvmbot
Copy link
Member

llvmbot commented Nov 13, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Michael Bedy (mjbedy)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/167929.diff

2 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+18-1)
  • (added) llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll (+82)
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index cc53b0dd3577e..e67e607ee1632 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -21623,6 +21623,17 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
       }
     }
 
+    // Helper to detect loads marked with !invariant.load metadata. Such loads
+    // are defined to read from memory that never changes for the lifetime of
+    // the program; any store to the same location would be UB. Therefore we
+    // can conservatively treat an invariant load and any store as non-aliasing
+    // for scheduling/dep purposes and skip creating a dependency edge.
+    auto IsInvariantLoad = [](const Instruction *I) {
+      if (const auto *LI = dyn_cast<LoadInst>(I))
+        return LI->getMetadata(LLVMContext::MD_invariant_load) != nullptr;
+      return false;
+    };
+
     // Handle the memory dependencies (if any).
     ScheduleData *NextLoadStore = BundleMember->getNextLoadStore();
     if (!NextLoadStore)
@@ -21636,10 +21647,15 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
     unsigned DistToSrc = 1;
     bool IsNonSimpleSrc = !SrcLoc.Ptr || !isSimple(SrcInst);
 
+    if (IsInvariantLoad(SrcInst))
+      return; // Invariant load cannot have memory dependencies.
+
     for (ScheduleData *DepDest = NextLoadStore; DepDest;
          DepDest = DepDest->getNextLoadStore()) {
       assert(isInSchedulingRegion(*DepDest) && "Expected to be in region");
 
+      Instruction *DestInst = DepDest->getInst();
+
       // We have two limits to reduce the complexity:
       // 1) AliasedCheckLimit: It's a small limit to reduce calls to
       //    SLP->isAliased (which is the expensive part in this loop).
@@ -21648,7 +21664,8 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
       //    It's important for the loop break condition (see below) to
       //    check this limit even between two read-only instructions.
       if (DistToSrc >= MaxMemDepDistance ||
-          ((SrcMayWrite || DepDest->getInst()->mayWriteToMemory()) &&
+          (!IsInvariantLoad(DestInst) && // Cannot have memory deps.
+           (SrcMayWrite || DepDest->getInst()->mayWriteToMemory()) &&
            (IsNonSimpleSrc || NumAliased >= AliasedCheckLimit ||
             SLP->isAliased(SrcLoc, SrcInst, DepDest->getInst())))) {
 
diff --git a/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll b/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll
new file mode 100644
index 0000000000000..00bd0feb8c0fa
--- /dev/null
+++ b/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll
@@ -0,0 +1,82 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -passes="function(slp-vectorizer)" -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 %s -S | FileCheck %s
+
+define void @test(ptr addrspace(1) %base, ptr addrspace(1) %otherA, ptr addrspace(1) %otherB) #0 {
+; CHECK-LABEL: define void @test(
+; CHECK-SAME: ptr addrspace(1) [[BASE:%.*]], ptr addrspace(1) [[OTHERA:%.*]], ptr addrspace(1) [[OTHERB:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[P0:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 0
+; CHECK-NEXT:    [[A0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 0
+; CHECK-NEXT:    [[B0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 0
+; CHECK-NEXT:    [[TMP0:%.*]] = load <2 x half>, ptr addrspace(1) [[A0PTR]], align 2, !invariant.load [[META0:![0-9]+]]
+; CHECK-NEXT:    [[TMP1:%.*]] = load <2 x half>, ptr addrspace(1) [[B0PTR]], align 2, !invariant.load [[META0]]
+; CHECK-NEXT:    [[TMP2:%.*]] = fadd reassoc <2 x half> [[TMP0]], [[TMP1]]
+; CHECK-NEXT:    store <2 x half> [[TMP2]], ptr addrspace(1) [[P0]], align 2
+; CHECK-NEXT:    ret void
+;
+entry:
+  %p0 = getelementptr half, ptr addrspace(1) %base, i32 0
+  %p1 = getelementptr half, ptr addrspace(1) %base, i32 1
+  ; First pair of invariant loads from otherA.
+  %A0PTR = getelementptr half, ptr addrspace(1) %otherA, i32 0
+  %B0PTR = getelementptr half, ptr addrspace(1) %otherB, i32 0
+  %A0 = load half, ptr addrspace(1) %A0PTR, align 2, !invariant.load !0
+  %B0 = load half, ptr addrspace(1) %B0PTR, align 2, !invariant.load !0
+  %add0 = fadd reassoc half %A0, %B0
+  store half %add0, ptr addrspace(1) %p0, align 2
+  %A1PTR = getelementptr half, ptr addrspace(1) %otherA, i32 1
+  %B1PTR = getelementptr half, ptr addrspace(1) %otherB, i32 1
+  %A1 = load half, ptr addrspace(1) %A1PTR, align 2, !invariant.load !0
+  %B1 = load half, ptr addrspace(1) %B1PTR, align 2, !invariant.load !0
+  %add1 = fadd reassoc half %A1, %B1
+  store half %add1, ptr addrspace(1) %p1, align 2
+  ret void
+}
+
+
+define void @aliastest(ptr addrspace(1) %base, ptr addrspace(1) %otherA, ptr addrspace(1) %otherB) #0 {
+; CHECK-LABEL: define void @aliastest(
+; CHECK-SAME: ptr addrspace(1) [[BASE:%.*]], ptr addrspace(1) [[OTHERA:%.*]], ptr addrspace(1) [[OTHERB:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[P0:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 0
+; CHECK-NEXT:    [[P1:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 1
+; CHECK-NEXT:    [[A0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 0
+; CHECK-NEXT:    [[B0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 0
+; CHECK-NEXT:    [[A0:%.*]] = load half, ptr addrspace(1) [[A0PTR]], align 2
+; CHECK-NEXT:    [[B0:%.*]] = load half, ptr addrspace(1) [[B0PTR]], align 2
+; CHECK-NEXT:    [[ADD0:%.*]] = fadd reassoc half [[A0]], [[B0]]
+; CHECK-NEXT:    store half [[ADD0]], ptr addrspace(1) [[P0]], align 2
+; CHECK-NEXT:    [[A1PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 1
+; CHECK-NEXT:    [[B1PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 1
+; CHECK-NEXT:    [[A1:%.*]] = load half, ptr addrspace(1) [[A1PTR]], align 2
+; CHECK-NEXT:    [[B1:%.*]] = load half, ptr addrspace(1) [[B1PTR]], align 2
+; CHECK-NEXT:    [[ADD1:%.*]] = fadd reassoc half [[A1]], [[B1]]
+; CHECK-NEXT:    store half [[ADD1]], ptr addrspace(1) [[P1]], align 2
+; CHECK-NEXT:    ret void
+;
+entry:
+  %p0 = getelementptr half, ptr addrspace(1) %base, i32 0
+  %p1 = getelementptr half, ptr addrspace(1) %base, i32 1
+  ; First pair of invariant loads from otherA.
+  %A0PTR = getelementptr half, ptr addrspace(1) %otherA, i32 0
+  %B0PTR = getelementptr half, ptr addrspace(1) %otherB, i32 0
+  %A0 = load half, ptr addrspace(1) %A0PTR, align 2
+  %B0 = load half, ptr addrspace(1) %B0PTR, align 2
+  %add0 = fadd reassoc half %A0, %B0
+  store half %add0, ptr addrspace(1) %p0, align 2
+  %A1PTR = getelementptr half, ptr addrspace(1) %otherA, i32 1
+  %B1PTR = getelementptr half, ptr addrspace(1) %otherB, i32 1
+  %A1 = load half, ptr addrspace(1) %A1PTR, align 2
+  %B1 = load half, ptr addrspace(1) %B1PTR, align 2
+  %add1 = fadd reassoc half %A1, %B1
+  store half %add1, ptr addrspace(1) %p1, align 2
+  ret void
+}
+
+
+attributes #0 = { nounwind }
+
+!0 = !{}
+;.
+; CHECK: [[META0]] = !{}
+;.

@llvmbot
Copy link
Member

llvmbot commented Nov 13, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Michael Bedy (mjbedy)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/167929.diff

2 Files Affected:

  • (modified) llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp (+18-1)
  • (added) llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll (+82)
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index cc53b0dd3577e..e67e607ee1632 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -21623,6 +21623,17 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
       }
     }
 
+    // Helper to detect loads marked with !invariant.load metadata. Such loads
+    // are defined to read from memory that never changes for the lifetime of
+    // the program; any store to the same location would be UB. Therefore we
+    // can conservatively treat an invariant load and any store as non-aliasing
+    // for scheduling/dep purposes and skip creating a dependency edge.
+    auto IsInvariantLoad = [](const Instruction *I) {
+      if (const auto *LI = dyn_cast<LoadInst>(I))
+        return LI->getMetadata(LLVMContext::MD_invariant_load) != nullptr;
+      return false;
+    };
+
     // Handle the memory dependencies (if any).
     ScheduleData *NextLoadStore = BundleMember->getNextLoadStore();
     if (!NextLoadStore)
@@ -21636,10 +21647,15 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
     unsigned DistToSrc = 1;
     bool IsNonSimpleSrc = !SrcLoc.Ptr || !isSimple(SrcInst);
 
+    if (IsInvariantLoad(SrcInst))
+      return; // Invariant load cannot have memory dependencies.
+
     for (ScheduleData *DepDest = NextLoadStore; DepDest;
          DepDest = DepDest->getNextLoadStore()) {
       assert(isInSchedulingRegion(*DepDest) && "Expected to be in region");
 
+      Instruction *DestInst = DepDest->getInst();
+
       // We have two limits to reduce the complexity:
       // 1) AliasedCheckLimit: It's a small limit to reduce calls to
       //    SLP->isAliased (which is the expensive part in this loop).
@@ -21648,7 +21664,8 @@ void BoUpSLP::BlockScheduling::calculateDependencies(
       //    It's important for the loop break condition (see below) to
       //    check this limit even between two read-only instructions.
       if (DistToSrc >= MaxMemDepDistance ||
-          ((SrcMayWrite || DepDest->getInst()->mayWriteToMemory()) &&
+          (!IsInvariantLoad(DestInst) && // Cannot have memory deps.
+           (SrcMayWrite || DepDest->getInst()->mayWriteToMemory()) &&
            (IsNonSimpleSrc || NumAliased >= AliasedCheckLimit ||
             SLP->isAliased(SrcLoc, SrcInst, DepDest->getInst())))) {
 
diff --git a/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll b/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll
new file mode 100644
index 0000000000000..00bd0feb8c0fa
--- /dev/null
+++ b/llvm/test/Transforms/SLPVectorizer/AMDGPU/invariant-load-no-alias-store.ll
@@ -0,0 +1,82 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -passes="function(slp-vectorizer)" -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1200 %s -S | FileCheck %s
+
+define void @test(ptr addrspace(1) %base, ptr addrspace(1) %otherA, ptr addrspace(1) %otherB) #0 {
+; CHECK-LABEL: define void @test(
+; CHECK-SAME: ptr addrspace(1) [[BASE:%.*]], ptr addrspace(1) [[OTHERA:%.*]], ptr addrspace(1) [[OTHERB:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[P0:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 0
+; CHECK-NEXT:    [[A0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 0
+; CHECK-NEXT:    [[B0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 0
+; CHECK-NEXT:    [[TMP0:%.*]] = load <2 x half>, ptr addrspace(1) [[A0PTR]], align 2, !invariant.load [[META0:![0-9]+]]
+; CHECK-NEXT:    [[TMP1:%.*]] = load <2 x half>, ptr addrspace(1) [[B0PTR]], align 2, !invariant.load [[META0]]
+; CHECK-NEXT:    [[TMP2:%.*]] = fadd reassoc <2 x half> [[TMP0]], [[TMP1]]
+; CHECK-NEXT:    store <2 x half> [[TMP2]], ptr addrspace(1) [[P0]], align 2
+; CHECK-NEXT:    ret void
+;
+entry:
+  %p0 = getelementptr half, ptr addrspace(1) %base, i32 0
+  %p1 = getelementptr half, ptr addrspace(1) %base, i32 1
+  ; First pair of invariant loads from otherA.
+  %A0PTR = getelementptr half, ptr addrspace(1) %otherA, i32 0
+  %B0PTR = getelementptr half, ptr addrspace(1) %otherB, i32 0
+  %A0 = load half, ptr addrspace(1) %A0PTR, align 2, !invariant.load !0
+  %B0 = load half, ptr addrspace(1) %B0PTR, align 2, !invariant.load !0
+  %add0 = fadd reassoc half %A0, %B0
+  store half %add0, ptr addrspace(1) %p0, align 2
+  %A1PTR = getelementptr half, ptr addrspace(1) %otherA, i32 1
+  %B1PTR = getelementptr half, ptr addrspace(1) %otherB, i32 1
+  %A1 = load half, ptr addrspace(1) %A1PTR, align 2, !invariant.load !0
+  %B1 = load half, ptr addrspace(1) %B1PTR, align 2, !invariant.load !0
+  %add1 = fadd reassoc half %A1, %B1
+  store half %add1, ptr addrspace(1) %p1, align 2
+  ret void
+}
+
+
+define void @aliastest(ptr addrspace(1) %base, ptr addrspace(1) %otherA, ptr addrspace(1) %otherB) #0 {
+; CHECK-LABEL: define void @aliastest(
+; CHECK-SAME: ptr addrspace(1) [[BASE:%.*]], ptr addrspace(1) [[OTHERA:%.*]], ptr addrspace(1) [[OTHERB:%.*]]) #[[ATTR0]] {
+; CHECK-NEXT:  [[ENTRY:.*:]]
+; CHECK-NEXT:    [[P0:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 0
+; CHECK-NEXT:    [[P1:%.*]] = getelementptr half, ptr addrspace(1) [[BASE]], i32 1
+; CHECK-NEXT:    [[A0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 0
+; CHECK-NEXT:    [[B0PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 0
+; CHECK-NEXT:    [[A0:%.*]] = load half, ptr addrspace(1) [[A0PTR]], align 2
+; CHECK-NEXT:    [[B0:%.*]] = load half, ptr addrspace(1) [[B0PTR]], align 2
+; CHECK-NEXT:    [[ADD0:%.*]] = fadd reassoc half [[A0]], [[B0]]
+; CHECK-NEXT:    store half [[ADD0]], ptr addrspace(1) [[P0]], align 2
+; CHECK-NEXT:    [[A1PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERA]], i32 1
+; CHECK-NEXT:    [[B1PTR:%.*]] = getelementptr half, ptr addrspace(1) [[OTHERB]], i32 1
+; CHECK-NEXT:    [[A1:%.*]] = load half, ptr addrspace(1) [[A1PTR]], align 2
+; CHECK-NEXT:    [[B1:%.*]] = load half, ptr addrspace(1) [[B1PTR]], align 2
+; CHECK-NEXT:    [[ADD1:%.*]] = fadd reassoc half [[A1]], [[B1]]
+; CHECK-NEXT:    store half [[ADD1]], ptr addrspace(1) [[P1]], align 2
+; CHECK-NEXT:    ret void
+;
+entry:
+  %p0 = getelementptr half, ptr addrspace(1) %base, i32 0
+  %p1 = getelementptr half, ptr addrspace(1) %base, i32 1
+  ; First pair of invariant loads from otherA.
+  %A0PTR = getelementptr half, ptr addrspace(1) %otherA, i32 0
+  %B0PTR = getelementptr half, ptr addrspace(1) %otherB, i32 0
+  %A0 = load half, ptr addrspace(1) %A0PTR, align 2
+  %B0 = load half, ptr addrspace(1) %B0PTR, align 2
+  %add0 = fadd reassoc half %A0, %B0
+  store half %add0, ptr addrspace(1) %p0, align 2
+  %A1PTR = getelementptr half, ptr addrspace(1) %otherA, i32 1
+  %B1PTR = getelementptr half, ptr addrspace(1) %otherB, i32 1
+  %A1 = load half, ptr addrspace(1) %A1PTR, align 2
+  %B1 = load half, ptr addrspace(1) %B1PTR, align 2
+  %add1 = fadd reassoc half %A1, %B1
+  store half %add1, ptr addrspace(1) %p1, align 2
+  ret void
+}
+
+
+attributes #0 = { nounwind }
+
+!0 = !{}
+;.
+; CHECK: [[META0]] = !{}
+;.

@mjbedy
Copy link
Contributor Author

mjbedy commented Nov 13, 2025

Looks like it's been too long since I committed upstream and no longer have write access. @alexey-bataev for review, @piotrAMD and @jayfoad FYI.

// for scheduling/dep purposes and skip creating a dependency edge.
auto IsInvariantLoad = [](const Instruction *I) {
if (const auto *LI = dyn_cast<LoadInst>(I))
return LI->getMetadata(LLVMContext::MD_invariant_load) != nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect this to go through an AA query instead of parsing this specific situation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree, would be good to have a general solution for this issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did consider that - and I guess I can look into that as well, but in this case it seems likely less expensive in compile time to do the check ahead of time (at least the early out for SrcInst.)

I can look into the AA aspect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dug in a bit more. It appears the MemoryDepedenceAnalysis code is also handling this explicitly. I assume there is a reason SLP doesn't use it?

There's an interesting and very similar comment in that code.

  // If the load is invariant, we "know" that it doesn't alias *any* write. We
  // do want to respect mustalias results since defs are useful for value
  // forwarding, but any mayalias write can be assumed to be noalias.
  // Arguably, this logic should be pushed inside AliasAnalysis itself.
  if (isLoad && QueryInst)
    if (LoadInst *LI = dyn_cast<LoadInst>(QueryInst)) {
      if (LI->hasMetadata(LLVMContext::MD_invariant_load))
        isInvariantLoad = true;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To close the loop on this, although I'm not familiar enough with the AA code to really be able to assess, after further digging it appears there are some pretty subtle questions about how AA would handle this. As noted above, MemoryDependenceAnalysis does in fact seem to take this into account, and that might be the better analysis phase for it anyway.

Copy link
Member

@alexey-bataev alexey-bataev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG with a nit

@piotrAMD piotrAMD merged commit a618895 into llvm:main Nov 18, 2025
10 checks passed
@github-actions
Copy link

@mjbedy Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 18, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fast running on sanitizer-buildbot3 while building llvm at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/17191

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 93840 tests, 64 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: LLVM :: ExecutionEngine/JITLink/x86-64/MachO_weak_references.s (68559 of 93840)
******************** TEST 'LLVM :: ExecutionEngine/JITLink/x86-64/MachO_weak_references.s' FAILED ********************
Exit Code: -6

Command Output (stdout):
--
# RUN: at line 1
rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp && mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp
# executed command: rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp
# note: command had no output on stdout or stderr
# executed command: mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-present -abs bar=0x1 -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-present -abs bar=0x1 -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-absent -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-absent -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# .---command stderr------------
# | libc++abi: Pure virtual function called!
# `-----------------------------
# error: command failed with exit status: -6

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
270.82s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
197.29s: Clang :: Driver/fsanitize.c
145.22s: Clang :: Preprocessor/riscv-target-features.c
136.62s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
128.49s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
Step 10 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:534: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 93840 tests, 64 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.
FAIL: LLVM :: ExecutionEngine/JITLink/x86-64/MachO_weak_references.s (68559 of 93840)
******************** TEST 'LLVM :: ExecutionEngine/JITLink/x86-64/MachO_weak_references.s' FAILED ********************
Exit Code: -6

Command Output (stdout):
--
# RUN: at line 1
rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp && mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp
# executed command: rm -rf /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp
# note: command had no output on stdout or stderr
# executed command: mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-mc -triple=x86_64-apple-macosx10.9 -filetype=obj -o /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-present -abs bar=0x1 -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-present -abs bar=0x1 -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-absent -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# executed command: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/llvm-jitlink -noexec -check-name=jitlink-check-bar-absent -check=/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/test/ExecutionEngine/JITLink/x86-64/MachO_weak_references.s /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/test/ExecutionEngine/JITLink/x86-64/Output/MachO_weak_references.s.tmp/macho_weak_refs.o
# .---command stderr------------
# | libc++abi: Pure virtual function called!
# `-----------------------------
# error: command failed with exit status: -6

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
270.82s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
197.29s: Clang :: Driver/fsanitize.c
145.22s: Clang :: Preprocessor/riscv-target-features.c
136.62s: LLVM :: CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
128.49s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp

@mjbedy mjbedy deleted the slp_invariant_pr branch November 21, 2025 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants