Skip to content

[GlobalISel] prevent G_UNMERGE_VALUES for vectors with different elements #133335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 18, 2025

Conversation

ro-i
Copy link
Contributor

@ro-i ro-i commented Mar 27, 2025

This commit prevents building a G_UNMERGE_VALUES instruction with different source and destination vector elements in LegalizationArtifactCombiner::ArtifactValueFinder::tryCombineMergeLike(), e.g.:
%1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)

This LLVM defect was identified via the AMD Fuzzing project.

(Updated commit message after implementing a different approach according to reviews.)

This commit adds support for using different source and destination
vector element sizes for G_UNMERGE_VALUES, e.g.:
`%1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)`

This LLVM defect was identified via the AMD Fuzzing project.
@llvmbot
Copy link
Member

llvmbot commented Mar 27, 2025

@llvm/pr-subscribers-llvm-globalisel

Author: Robert Imschweiler (ro-i)

Changes

This commit adds support for using different source and destination vector element sizes for G_UNMERGE_VALUES, e.g.:
%1:_(&lt;2 x s8&gt;), %2:_(&lt;2 x s8&gt;) = G_UNMERGE_VALUES %0:_(&lt;2 x s16&gt;)

This LLVM defect was identified via the AMD Fuzzing project.


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

4 Files Affected:

  • (modified) llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp (+21-11)
  • (modified) llvm/lib/CodeGen/MachineVerifier.cpp (+5-5)
  • (modified) llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll (+55)
  • (modified) llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir (+155)
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index a9f80860124fb..4fcad22587f66 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -8281,9 +8281,8 @@ LegalizerHelper::LegalizeResult
 LegalizerHelper::lowerUnmergeValues(MachineInstr &MI) {
   const unsigned NumDst = MI.getNumOperands() - 1;
   Register SrcReg = MI.getOperand(NumDst).getReg();
-  Register Dst0Reg = MI.getOperand(0).getReg();
-  LLT DstTy = MRI.getType(Dst0Reg);
-  if (DstTy.isPointer())
+  LLT DstTy = MRI.getType(MI.getOperand(0).getReg());
+  if (DstTy.getScalarType().isPointer())
     return UnableToLegalize; // TODO
 
   SrcReg = coerceToScalar(SrcReg);
@@ -8293,14 +8292,25 @@ LegalizerHelper::lowerUnmergeValues(MachineInstr &MI) {
   // Expand scalarizing unmerge as bitcast to integer and shift.
   LLT IntTy = MRI.getType(SrcReg);
 
-  MIRBuilder.buildTrunc(Dst0Reg, SrcReg);
-
-  const unsigned DstSize = DstTy.getSizeInBits();
-  unsigned Offset = DstSize;
-  for (unsigned I = 1; I != NumDst; ++I, Offset += DstSize) {
-    auto ShiftAmt = MIRBuilder.buildConstant(IntTy, Offset);
-    auto Shift = MIRBuilder.buildLShr(IntTy, SrcReg, ShiftAmt);
-    MIRBuilder.buildTrunc(MI.getOperand(I), Shift);
+  const unsigned DstSize = DstTy.getScalarSizeInBits();
+  SmallVector<Register> VectorElems;
+  Register Shift;
+  for (unsigned I = 0, Offset = 0; I != NumDst; Offset += DstSize) {
+    if (Offset) {
+      auto ShiftAmt = MIRBuilder.buildConstant(IntTy, Offset);
+      Shift = MIRBuilder.buildLShr(IntTy, SrcReg, ShiftAmt).getReg(0);
+    } else {
+      Shift = SrcReg;
+    }
+    if (DstTy.isVector()) {
+      VectorElems.emplace_back(MIRBuilder.buildTrunc(DstTy.getScalarType(), Shift).getReg(0));
+      if (VectorElems.size() == DstTy.getNumElements()) {
+        MIRBuilder.buildBuildVector(MI.getOperand(I++), VectorElems);
+        VectorElems.clear();
+      }
+    } else {
+      MIRBuilder.buildTrunc(MI.getOperand(I++), Shift);
+    }
   }
 
   MI.eraseFromParent();
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index a7dbceb88c4c8..7cbf41038f6e4 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1510,11 +1510,11 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
 
     LLT SrcTy = MRI->getType(MI->getOperand(NumDsts).getReg());
     if (DstTy.isVector()) {
-      // This case is the converse of G_CONCAT_VECTORS.
-      if (!SrcTy.isVector() ||
-          (SrcTy.getScalarType() != DstTy.getScalarType() &&
-           !SrcTy.isPointerVector()) ||
-          SrcTy.isScalableVector() != DstTy.isScalableVector() ||
+      // This case is the converse of G_CONCAT_VECTORS, but relaxed since
+      // G_UNMERGE_VALUES can handle src and dst vectors with different
+      // element sizes:
+      //   %1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)
+      if (SrcTy.isScalableVector() != DstTy.isScalableVector() ||
           SrcTy.getSizeInBits() != NumDsts * DstTy.getSizeInBits())
         report("G_UNMERGE_VALUES source operand does not match vector "
                "destination operands",
diff --git a/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll b/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
index 5eca04c02a9f9..96889f7a957b2 100644
--- a/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+++ b/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
@@ -6508,3 +6508,58 @@ entry:
   %insert = insertelement <5 x double> %vec, double %val, i32 %idx
   ret <5 x double> %insert
 }
+
+; Found by fuzzer, reduced with llvm-reduce.
+define amdgpu_kernel void @insert_very_small_from_very_large(<32 x i16> %L3, ptr %ptr) {
+; GPRIDX-LABEL: insert_very_small_from_very_large:
+; GPRIDX:       ; %bb.0: ; %bb
+; GPRIDX-NEXT:    s_load_dwordx16 s[12:27], s[8:9], 0x0
+; GPRIDX-NEXT:    s_load_dwordx2 s[0:1], s[8:9], 0x40
+; GPRIDX-NEXT:    s_waitcnt lgkmcnt(0)
+; GPRIDX-NEXT:    s_lshr_b32 s2, s12, 1
+; GPRIDX-NEXT:    s_and_b32 s2, s2, 1
+; GPRIDX-NEXT:    s_lshl_b32 s2, s2, 1
+; GPRIDX-NEXT:    v_mov_b32_e32 v0, s0
+; GPRIDX-NEXT:    v_mov_b32_e32 v2, s2
+; GPRIDX-NEXT:    v_mov_b32_e32 v1, s1
+; GPRIDX-NEXT:    flat_store_byte v[0:1], v2
+; GPRIDX-NEXT:    s_endpgm
+;
+; GFX10-LABEL: insert_very_small_from_very_large:
+; GFX10:       ; %bb.0: ; %bb
+; GFX10-NEXT:    s_clause 0x1
+; GFX10-NEXT:    s_load_dwordx16 s[12:27], s[8:9], 0x0
+; GFX10-NEXT:    s_load_dwordx2 s[0:1], s[8:9], 0x40
+; GFX10-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX10-NEXT:    s_lshr_b32 s2, s12, 1
+; GFX10-NEXT:    v_mov_b32_e32 v0, s0
+; GFX10-NEXT:    s_and_b32 s2, s2, 1
+; GFX10-NEXT:    v_mov_b32_e32 v1, s1
+; GFX10-NEXT:    s_lshl_b32 s2, s2, 1
+; GFX10-NEXT:    v_mov_b32_e32 v2, s2
+; GFX10-NEXT:    flat_store_byte v[0:1], v2
+; GFX10-NEXT:    s_endpgm
+;
+; GFX11-LABEL: insert_very_small_from_very_large:
+; GFX11:       ; %bb.0: ; %bb
+; GFX11-NEXT:    s_clause 0x1
+; GFX11-NEXT:    s_load_b512 s[8:23], s[4:5], 0x0
+; GFX11-NEXT:    s_load_b64 s[0:1], s[4:5], 0x40
+; GFX11-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX11-NEXT:    s_lshr_b32 s2, s8, 1
+; GFX11-NEXT:    v_mov_b32_e32 v0, s0
+; GFX11-NEXT:    s_and_b32 s2, s2, 1
+; GFX11-NEXT:    v_mov_b32_e32 v1, s1
+; GFX11-NEXT:    s_lshl_b32 s2, s2, 1
+; GFX11-NEXT:    v_mov_b32_e32 v2, s2
+; GFX11-NEXT:    flat_store_b8 v[0:1], v2
+; GFX11-NEXT:    s_endpgm
+bb:
+  %0 = bitcast <32 x i16> %L3 to i512
+  %1 = trunc i512 %0 to i8
+  %2 = trunc i8 %1 to i2
+  %3 = bitcast i2 %2 to <2 x i1>
+  %I = insertelement <2 x i1> %3, i1 false, i32 0
+  store <2 x i1> %I, ptr %ptr, align 1
+  ret void
+}
diff --git a/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir b/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
index c231aa8334d45..3500df7c99b6e 100644
--- a/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
+++ b/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
@@ -96,6 +96,41 @@ body: |
     $vgpr1 = COPY %4
 ...
 
+---
+name: test_unmerge_v2s8_v2s16
+body: |
+  bb.0:
+    liveins: $vgpr0
+    ; CHECK-LABEL: name: test_unmerge_v2s8_v2s16
+    ; CHECK: liveins: $vgpr0
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
+    ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
+    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
+    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
+    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
+    ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C1]](s32)
+    ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
+    ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C2]](s32)
+    ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C3]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C3]]
+    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
+    ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
+    ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LSHR2]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[LSHR1]], [[SHL1]]
+    ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
+    ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
+    ; CHECK-NEXT: $vgpr1 = COPY [[BITCAST2]](<2 x s16>)
+    %0:_(<2 x s16>) = COPY $vgpr0
+    %1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)
+    %3:_(<2 x s16>) = G_ANYEXT %1
+    %4:_(<2 x s16>) = G_ANYEXT %2
+    $vgpr0 = COPY %3
+    $vgpr1 = COPY %4
+...
+
 ---
 name: test_unmerge_s16_v3s16
 body: |
@@ -120,6 +155,50 @@ body: |
     $vgpr2 = COPY %6
 ...
 
+---
+name: test_unmerge_v2s8_v3s16
+body: |
+  bb.0:
+    ; CHECK-LABEL: name: test_unmerge_v2s8_v3s16
+    ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
+    ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
+    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
+    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
+    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
+    ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
+    ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
+    ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C1]](s32)
+    ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C2]](s32)
+    ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
+    ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
+    ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C3]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C3]]
+    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
+    ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
+    ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LSHR2]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[LSHR1]], [[SHL1]]
+    ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
+    ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST2]], [[C3]]
+    ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR3]], [[C3]]
+    ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL2]]
+    ; CHECK-NEXT: [[BITCAST5:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR2]](s32)
+    ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST3]](<2 x s16>)
+    ; CHECK-NEXT: $vgpr1 = COPY [[BITCAST4]](<2 x s16>)
+    ; CHECK-NEXT: $vgpr2 = COPY [[BITCAST5]](<2 x s16>)
+    %0:_(<3 x s16>) = G_IMPLICIT_DEF
+    %1:_(<2 x s8>), %2:_(<2 x s8>), %3:_(<2 x s8>) = G_UNMERGE_VALUES %0
+    %4:_(<2 x s16>) = G_ANYEXT %1
+    %5:_(<2 x s16>) = G_ANYEXT %2
+    %6:_(<2 x s16>) = G_ANYEXT %3
+    $vgpr0 = COPY %4
+    $vgpr1 = COPY %5
+    $vgpr2 = COPY %6
+...
+
 ---
 
 name: test_unmerge_s16_v4s16
@@ -191,6 +270,62 @@ body: |
     $vgpr5 = COPY %12
 ...
 
+---
+name: test_unmerge_v4s8_v6s16
+body: |
+  bb.0:
+    liveins: $vgpr0_vgpr1
+    ; CHECK-LABEL: name: test_unmerge_v4s8_v6s16
+    ; CHECK: liveins: $vgpr0_vgpr1
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8), [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8), [[UV6:%[0-9]+]]:_(s8), [[UV7:%[0-9]+]]:_(s8), [[UV8:%[0-9]+]]:_(s8), [[UV9:%[0-9]+]]:_(s8), [[UV10:%[0-9]+]]:_(s8), [[UV11:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s8)
+    ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV1]](s8)
+    ; CHECK-NEXT: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s8)
+    ; CHECK-NEXT: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[UV3]](s8)
+    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32), [[ANYEXT2]](s32), [[ANYEXT3]](s32)
+    ; CHECK-NEXT: [[UV12:%[0-9]+]]:_(s8), [[UV13:%[0-9]+]]:_(s8), [[UV14:%[0-9]+]]:_(s8), [[UV15:%[0-9]+]]:_(s8), [[UV16:%[0-9]+]]:_(s8), [[UV17:%[0-9]+]]:_(s8), [[UV18:%[0-9]+]]:_(s8), [[UV19:%[0-9]+]]:_(s8), [[UV20:%[0-9]+]]:_(s8), [[UV21:%[0-9]+]]:_(s8), [[UV22:%[0-9]+]]:_(s8), [[UV23:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[UV16]](s8)
+    ; CHECK-NEXT: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[UV17]](s8)
+    ; CHECK-NEXT: [[ANYEXT6:%[0-9]+]]:_(s32) = G_ANYEXT [[UV18]](s8)
+    ; CHECK-NEXT: [[ANYEXT7:%[0-9]+]]:_(s32) = G_ANYEXT [[UV19]](s8)
+    ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT4]](s32), [[ANYEXT5]](s32), [[ANYEXT6]](s32), [[ANYEXT7]](s32)
+    ; CHECK-NEXT: [[UV24:%[0-9]+]]:_(s8), [[UV25:%[0-9]+]]:_(s8), [[UV26:%[0-9]+]]:_(s8), [[UV27:%[0-9]+]]:_(s8), [[UV28:%[0-9]+]]:_(s8), [[UV29:%[0-9]+]]:_(s8), [[UV30:%[0-9]+]]:_(s8), [[UV31:%[0-9]+]]:_(s8), [[UV32:%[0-9]+]]:_(s8), [[UV33:%[0-9]+]]:_(s8), [[UV34:%[0-9]+]]:_(s8), [[UV35:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: [[ANYEXT8:%[0-9]+]]:_(s32) = G_ANYEXT [[UV32]](s8)
+    ; CHECK-NEXT: [[ANYEXT9:%[0-9]+]]:_(s32) = G_ANYEXT [[UV33]](s8)
+    ; CHECK-NEXT: [[ANYEXT10:%[0-9]+]]:_(s32) = G_ANYEXT [[UV34]](s8)
+    ; CHECK-NEXT: [[ANYEXT11:%[0-9]+]]:_(s32) = G_ANYEXT [[UV35]](s8)
+    ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT8]](s32), [[ANYEXT9]](s32), [[ANYEXT10]](s32), [[ANYEXT11]](s32)
+    ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
+    ; CHECK-NEXT: $vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[BUILD_VECTOR1]](<4 x s32>)
+    ; CHECK-NEXT: $vgpr8_vgpr9_vgpr10_vgpr11 = COPY [[BUILD_VECTOR2]](<4 x s32>)
+    %0:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    %1:_(<4 x s8>), %2:_(<4 x s8>), %3:_(<4 x s8>) = G_UNMERGE_VALUES %0
+    %4:_(<4 x s32>) = G_ANYEXT %1
+    %5:_(<4 x s32>) = G_ANYEXT %2
+    %6:_(<4 x s32>) = G_ANYEXT %3
+    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
+    $vgpr4_vgpr5_vgpr6_vgpr7 = COPY %5
+    $vgpr8_vgpr9_vgpr10_vgpr11 = COPY %6
+...
+
+---
+name: test_unmerge_v3s32_v6s16
+body: |
+  bb.0:
+    liveins: $vgpr0_vgpr1
+    ; CHECK-LABEL: name: test_unmerge_v3s32_v6s16
+    ; CHECK: liveins: $vgpr0_vgpr1
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[UV]](<3 x s32>)
+    %0:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    %1:_(<3 x s32>) = G_UNMERGE_VALUES %0
+    $vgpr0_vgpr1_vgpr2 = COPY %1
+...
+
 ---
 
 name: test_unmerge_s8_s16
@@ -1090,3 +1225,23 @@ body: |
     $vgpr9_vgpr10_vgpr11 = COPY %8
 
 ...
+
+---
+name: test_unmerge_v3s32_v12s16
+body: |
+  bb.0:
+    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+
+    ; CHECK-LABEL: name: test_unmerge_v3s32_v12s16
+    ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<12 x s16>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<3 x s32>), [[UV1:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[COPY]](<12 x s16>)
+    ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[UV]](<3 x s32>)
+    ; CHECK-NEXT: $vgpr3_vgpr4_vgpr5 = COPY [[UV1]](<3 x s32>)
+    %0:_(<12 x s16>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+    %1:_(<3 x s32>), %2:_(<3 x s32>) = G_UNMERGE_VALUES %0
+    $vgpr0_vgpr1_vgpr2 = COPY %1
+    $vgpr3_vgpr4_vgpr5 = COPY %2
+
+...

@llvmbot
Copy link
Member

llvmbot commented Mar 27, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Robert Imschweiler (ro-i)

Changes

This commit adds support for using different source and destination vector element sizes for G_UNMERGE_VALUES, e.g.:
%1:_(&lt;2 x s8&gt;), %2:_(&lt;2 x s8&gt;) = G_UNMERGE_VALUES %0:_(&lt;2 x s16&gt;)

This LLVM defect was identified via the AMD Fuzzing project.


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

4 Files Affected:

  • (modified) llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp (+21-11)
  • (modified) llvm/lib/CodeGen/MachineVerifier.cpp (+5-5)
  • (modified) llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll (+55)
  • (modified) llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir (+155)
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
index a9f80860124fb..4fcad22587f66 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -8281,9 +8281,8 @@ LegalizerHelper::LegalizeResult
 LegalizerHelper::lowerUnmergeValues(MachineInstr &MI) {
   const unsigned NumDst = MI.getNumOperands() - 1;
   Register SrcReg = MI.getOperand(NumDst).getReg();
-  Register Dst0Reg = MI.getOperand(0).getReg();
-  LLT DstTy = MRI.getType(Dst0Reg);
-  if (DstTy.isPointer())
+  LLT DstTy = MRI.getType(MI.getOperand(0).getReg());
+  if (DstTy.getScalarType().isPointer())
     return UnableToLegalize; // TODO
 
   SrcReg = coerceToScalar(SrcReg);
@@ -8293,14 +8292,25 @@ LegalizerHelper::lowerUnmergeValues(MachineInstr &MI) {
   // Expand scalarizing unmerge as bitcast to integer and shift.
   LLT IntTy = MRI.getType(SrcReg);
 
-  MIRBuilder.buildTrunc(Dst0Reg, SrcReg);
-
-  const unsigned DstSize = DstTy.getSizeInBits();
-  unsigned Offset = DstSize;
-  for (unsigned I = 1; I != NumDst; ++I, Offset += DstSize) {
-    auto ShiftAmt = MIRBuilder.buildConstant(IntTy, Offset);
-    auto Shift = MIRBuilder.buildLShr(IntTy, SrcReg, ShiftAmt);
-    MIRBuilder.buildTrunc(MI.getOperand(I), Shift);
+  const unsigned DstSize = DstTy.getScalarSizeInBits();
+  SmallVector<Register> VectorElems;
+  Register Shift;
+  for (unsigned I = 0, Offset = 0; I != NumDst; Offset += DstSize) {
+    if (Offset) {
+      auto ShiftAmt = MIRBuilder.buildConstant(IntTy, Offset);
+      Shift = MIRBuilder.buildLShr(IntTy, SrcReg, ShiftAmt).getReg(0);
+    } else {
+      Shift = SrcReg;
+    }
+    if (DstTy.isVector()) {
+      VectorElems.emplace_back(MIRBuilder.buildTrunc(DstTy.getScalarType(), Shift).getReg(0));
+      if (VectorElems.size() == DstTy.getNumElements()) {
+        MIRBuilder.buildBuildVector(MI.getOperand(I++), VectorElems);
+        VectorElems.clear();
+      }
+    } else {
+      MIRBuilder.buildTrunc(MI.getOperand(I++), Shift);
+    }
   }
 
   MI.eraseFromParent();
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index a7dbceb88c4c8..7cbf41038f6e4 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1510,11 +1510,11 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
 
     LLT SrcTy = MRI->getType(MI->getOperand(NumDsts).getReg());
     if (DstTy.isVector()) {
-      // This case is the converse of G_CONCAT_VECTORS.
-      if (!SrcTy.isVector() ||
-          (SrcTy.getScalarType() != DstTy.getScalarType() &&
-           !SrcTy.isPointerVector()) ||
-          SrcTy.isScalableVector() != DstTy.isScalableVector() ||
+      // This case is the converse of G_CONCAT_VECTORS, but relaxed since
+      // G_UNMERGE_VALUES can handle src and dst vectors with different
+      // element sizes:
+      //   %1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)
+      if (SrcTy.isScalableVector() != DstTy.isScalableVector() ||
           SrcTy.getSizeInBits() != NumDsts * DstTy.getSizeInBits())
         report("G_UNMERGE_VALUES source operand does not match vector "
                "destination operands",
diff --git a/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll b/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
index 5eca04c02a9f9..96889f7a957b2 100644
--- a/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+++ b/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
@@ -6508,3 +6508,58 @@ entry:
   %insert = insertelement <5 x double> %vec, double %val, i32 %idx
   ret <5 x double> %insert
 }
+
+; Found by fuzzer, reduced with llvm-reduce.
+define amdgpu_kernel void @insert_very_small_from_very_large(<32 x i16> %L3, ptr %ptr) {
+; GPRIDX-LABEL: insert_very_small_from_very_large:
+; GPRIDX:       ; %bb.0: ; %bb
+; GPRIDX-NEXT:    s_load_dwordx16 s[12:27], s[8:9], 0x0
+; GPRIDX-NEXT:    s_load_dwordx2 s[0:1], s[8:9], 0x40
+; GPRIDX-NEXT:    s_waitcnt lgkmcnt(0)
+; GPRIDX-NEXT:    s_lshr_b32 s2, s12, 1
+; GPRIDX-NEXT:    s_and_b32 s2, s2, 1
+; GPRIDX-NEXT:    s_lshl_b32 s2, s2, 1
+; GPRIDX-NEXT:    v_mov_b32_e32 v0, s0
+; GPRIDX-NEXT:    v_mov_b32_e32 v2, s2
+; GPRIDX-NEXT:    v_mov_b32_e32 v1, s1
+; GPRIDX-NEXT:    flat_store_byte v[0:1], v2
+; GPRIDX-NEXT:    s_endpgm
+;
+; GFX10-LABEL: insert_very_small_from_very_large:
+; GFX10:       ; %bb.0: ; %bb
+; GFX10-NEXT:    s_clause 0x1
+; GFX10-NEXT:    s_load_dwordx16 s[12:27], s[8:9], 0x0
+; GFX10-NEXT:    s_load_dwordx2 s[0:1], s[8:9], 0x40
+; GFX10-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX10-NEXT:    s_lshr_b32 s2, s12, 1
+; GFX10-NEXT:    v_mov_b32_e32 v0, s0
+; GFX10-NEXT:    s_and_b32 s2, s2, 1
+; GFX10-NEXT:    v_mov_b32_e32 v1, s1
+; GFX10-NEXT:    s_lshl_b32 s2, s2, 1
+; GFX10-NEXT:    v_mov_b32_e32 v2, s2
+; GFX10-NEXT:    flat_store_byte v[0:1], v2
+; GFX10-NEXT:    s_endpgm
+;
+; GFX11-LABEL: insert_very_small_from_very_large:
+; GFX11:       ; %bb.0: ; %bb
+; GFX11-NEXT:    s_clause 0x1
+; GFX11-NEXT:    s_load_b512 s[8:23], s[4:5], 0x0
+; GFX11-NEXT:    s_load_b64 s[0:1], s[4:5], 0x40
+; GFX11-NEXT:    s_waitcnt lgkmcnt(0)
+; GFX11-NEXT:    s_lshr_b32 s2, s8, 1
+; GFX11-NEXT:    v_mov_b32_e32 v0, s0
+; GFX11-NEXT:    s_and_b32 s2, s2, 1
+; GFX11-NEXT:    v_mov_b32_e32 v1, s1
+; GFX11-NEXT:    s_lshl_b32 s2, s2, 1
+; GFX11-NEXT:    v_mov_b32_e32 v2, s2
+; GFX11-NEXT:    flat_store_b8 v[0:1], v2
+; GFX11-NEXT:    s_endpgm
+bb:
+  %0 = bitcast <32 x i16> %L3 to i512
+  %1 = trunc i512 %0 to i8
+  %2 = trunc i8 %1 to i2
+  %3 = bitcast i2 %2 to <2 x i1>
+  %I = insertelement <2 x i1> %3, i1 false, i32 0
+  store <2 x i1> %I, ptr %ptr, align 1
+  ret void
+}
diff --git a/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir b/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
index c231aa8334d45..3500df7c99b6e 100644
--- a/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
+++ b/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
@@ -96,6 +96,41 @@ body: |
     $vgpr1 = COPY %4
 ...
 
+---
+name: test_unmerge_v2s8_v2s16
+body: |
+  bb.0:
+    liveins: $vgpr0
+    ; CHECK-LABEL: name: test_unmerge_v2s8_v2s16
+    ; CHECK: liveins: $vgpr0
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
+    ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[COPY]](<2 x s16>)
+    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
+    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
+    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
+    ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C1]](s32)
+    ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
+    ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C2]](s32)
+    ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C3]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C3]]
+    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
+    ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
+    ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LSHR2]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[LSHR1]], [[SHL1]]
+    ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
+    ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST1]](<2 x s16>)
+    ; CHECK-NEXT: $vgpr1 = COPY [[BITCAST2]](<2 x s16>)
+    %0:_(<2 x s16>) = COPY $vgpr0
+    %1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)
+    %3:_(<2 x s16>) = G_ANYEXT %1
+    %4:_(<2 x s16>) = G_ANYEXT %2
+    $vgpr0 = COPY %3
+    $vgpr1 = COPY %4
+...
+
 ---
 name: test_unmerge_s16_v3s16
 body: |
@@ -120,6 +155,50 @@ body: |
     $vgpr2 = COPY %6
 ...
 
+---
+name: test_unmerge_v2s8_v3s16
+body: |
+  bb.0:
+    ; CHECK-LABEL: name: test_unmerge_v2s8_v3s16
+    ; CHECK: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[DEF]](<4 x s16>)
+    ; CHECK-NEXT: [[BITCAST:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
+    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 8
+    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST]], [[C]](s32)
+    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 16
+    ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 24
+    ; CHECK-NEXT: [[BITCAST1:%[0-9]+]]:_(s32) = G_BITCAST [[UV]](<2 x s16>)
+    ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C1]](s32)
+    ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST1]], [[C2]](s32)
+    ; CHECK-NEXT: [[BITCAST2:%[0-9]+]]:_(s32) = G_BITCAST [[UV1]](<2 x s16>)
+    ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR [[BITCAST2]], [[C]](s32)
+    ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[BITCAST]], [[C3]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[LSHR]], [[C3]]
+    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[AND]], [[SHL]]
+    ; CHECK-NEXT: [[BITCAST3:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR]](s32)
+    ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[LSHR2]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[LSHR1]], [[SHL1]]
+    ; CHECK-NEXT: [[BITCAST4:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR1]](s32)
+    ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND [[BITCAST2]], [[C3]]
+    ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(s32) = G_AND [[LSHR3]], [[C3]]
+    ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL [[AND3]], [[C1]](s32)
+    ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[AND2]], [[SHL2]]
+    ; CHECK-NEXT: [[BITCAST5:%[0-9]+]]:_(<2 x s16>) = G_BITCAST [[OR2]](s32)
+    ; CHECK-NEXT: $vgpr0 = COPY [[BITCAST3]](<2 x s16>)
+    ; CHECK-NEXT: $vgpr1 = COPY [[BITCAST4]](<2 x s16>)
+    ; CHECK-NEXT: $vgpr2 = COPY [[BITCAST5]](<2 x s16>)
+    %0:_(<3 x s16>) = G_IMPLICIT_DEF
+    %1:_(<2 x s8>), %2:_(<2 x s8>), %3:_(<2 x s8>) = G_UNMERGE_VALUES %0
+    %4:_(<2 x s16>) = G_ANYEXT %1
+    %5:_(<2 x s16>) = G_ANYEXT %2
+    %6:_(<2 x s16>) = G_ANYEXT %3
+    $vgpr0 = COPY %4
+    $vgpr1 = COPY %5
+    $vgpr2 = COPY %6
+...
+
 ---
 
 name: test_unmerge_s16_v4s16
@@ -191,6 +270,62 @@ body: |
     $vgpr5 = COPY %12
 ...
 
+---
+name: test_unmerge_v4s8_v6s16
+body: |
+  bb.0:
+    liveins: $vgpr0_vgpr1
+    ; CHECK-LABEL: name: test_unmerge_v4s8_v6s16
+    ; CHECK: liveins: $vgpr0_vgpr1
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s8), [[UV1:%[0-9]+]]:_(s8), [[UV2:%[0-9]+]]:_(s8), [[UV3:%[0-9]+]]:_(s8), [[UV4:%[0-9]+]]:_(s8), [[UV5:%[0-9]+]]:_(s8), [[UV6:%[0-9]+]]:_(s8), [[UV7:%[0-9]+]]:_(s8), [[UV8:%[0-9]+]]:_(s8), [[UV9:%[0-9]+]]:_(s8), [[UV10:%[0-9]+]]:_(s8), [[UV11:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[UV]](s8)
+    ; CHECK-NEXT: [[ANYEXT1:%[0-9]+]]:_(s32) = G_ANYEXT [[UV1]](s8)
+    ; CHECK-NEXT: [[ANYEXT2:%[0-9]+]]:_(s32) = G_ANYEXT [[UV2]](s8)
+    ; CHECK-NEXT: [[ANYEXT3:%[0-9]+]]:_(s32) = G_ANYEXT [[UV3]](s8)
+    ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT]](s32), [[ANYEXT1]](s32), [[ANYEXT2]](s32), [[ANYEXT3]](s32)
+    ; CHECK-NEXT: [[UV12:%[0-9]+]]:_(s8), [[UV13:%[0-9]+]]:_(s8), [[UV14:%[0-9]+]]:_(s8), [[UV15:%[0-9]+]]:_(s8), [[UV16:%[0-9]+]]:_(s8), [[UV17:%[0-9]+]]:_(s8), [[UV18:%[0-9]+]]:_(s8), [[UV19:%[0-9]+]]:_(s8), [[UV20:%[0-9]+]]:_(s8), [[UV21:%[0-9]+]]:_(s8), [[UV22:%[0-9]+]]:_(s8), [[UV23:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: [[ANYEXT4:%[0-9]+]]:_(s32) = G_ANYEXT [[UV16]](s8)
+    ; CHECK-NEXT: [[ANYEXT5:%[0-9]+]]:_(s32) = G_ANYEXT [[UV17]](s8)
+    ; CHECK-NEXT: [[ANYEXT6:%[0-9]+]]:_(s32) = G_ANYEXT [[UV18]](s8)
+    ; CHECK-NEXT: [[ANYEXT7:%[0-9]+]]:_(s32) = G_ANYEXT [[UV19]](s8)
+    ; CHECK-NEXT: [[BUILD_VECTOR1:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT4]](s32), [[ANYEXT5]](s32), [[ANYEXT6]](s32), [[ANYEXT7]](s32)
+    ; CHECK-NEXT: [[UV24:%[0-9]+]]:_(s8), [[UV25:%[0-9]+]]:_(s8), [[UV26:%[0-9]+]]:_(s8), [[UV27:%[0-9]+]]:_(s8), [[UV28:%[0-9]+]]:_(s8), [[UV29:%[0-9]+]]:_(s8), [[UV30:%[0-9]+]]:_(s8), [[UV31:%[0-9]+]]:_(s8), [[UV32:%[0-9]+]]:_(s8), [[UV33:%[0-9]+]]:_(s8), [[UV34:%[0-9]+]]:_(s8), [[UV35:%[0-9]+]]:_(s8) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: [[ANYEXT8:%[0-9]+]]:_(s32) = G_ANYEXT [[UV32]](s8)
+    ; CHECK-NEXT: [[ANYEXT9:%[0-9]+]]:_(s32) = G_ANYEXT [[UV33]](s8)
+    ; CHECK-NEXT: [[ANYEXT10:%[0-9]+]]:_(s32) = G_ANYEXT [[UV34]](s8)
+    ; CHECK-NEXT: [[ANYEXT11:%[0-9]+]]:_(s32) = G_ANYEXT [[UV35]](s8)
+    ; CHECK-NEXT: [[BUILD_VECTOR2:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[ANYEXT8]](s32), [[ANYEXT9]](s32), [[ANYEXT10]](s32), [[ANYEXT11]](s32)
+    ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<4 x s32>)
+    ; CHECK-NEXT: $vgpr4_vgpr5_vgpr6_vgpr7 = COPY [[BUILD_VECTOR1]](<4 x s32>)
+    ; CHECK-NEXT: $vgpr8_vgpr9_vgpr10_vgpr11 = COPY [[BUILD_VECTOR2]](<4 x s32>)
+    %0:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    %1:_(<4 x s8>), %2:_(<4 x s8>), %3:_(<4 x s8>) = G_UNMERGE_VALUES %0
+    %4:_(<4 x s32>) = G_ANYEXT %1
+    %5:_(<4 x s32>) = G_ANYEXT %2
+    %6:_(<4 x s32>) = G_ANYEXT %3
+    $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %4
+    $vgpr4_vgpr5_vgpr6_vgpr7 = COPY %5
+    $vgpr8_vgpr9_vgpr10_vgpr11 = COPY %6
+...
+
+---
+name: test_unmerge_v3s32_v6s16
+body: |
+  bb.0:
+    liveins: $vgpr0_vgpr1
+    ; CHECK-LABEL: name: test_unmerge_v3s32_v6s16
+    ; CHECK: liveins: $vgpr0_vgpr1
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[COPY]](<6 x s16>)
+    ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[UV]](<3 x s32>)
+    %0:_(<6 x s16>) = COPY $vgpr0_vgpr1_vgpr2
+    %1:_(<3 x s32>) = G_UNMERGE_VALUES %0
+    $vgpr0_vgpr1_vgpr2 = COPY %1
+...
+
 ---
 
 name: test_unmerge_s8_s16
@@ -1090,3 +1225,23 @@ body: |
     $vgpr9_vgpr10_vgpr11 = COPY %8
 
 ...
+
+---
+name: test_unmerge_v3s32_v12s16
+body: |
+  bb.0:
+    liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+
+    ; CHECK-LABEL: name: test_unmerge_v3s32_v12s16
+    ; CHECK: liveins: $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+    ; CHECK-NEXT: {{  $}}
+    ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<12 x s16>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+    ; CHECK-NEXT: [[UV:%[0-9]+]]:_(<3 x s32>), [[UV1:%[0-9]+]]:_(<3 x s32>) = G_UNMERGE_VALUES [[COPY]](<12 x s16>)
+    ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[UV]](<3 x s32>)
+    ; CHECK-NEXT: $vgpr3_vgpr4_vgpr5 = COPY [[UV1]](<3 x s32>)
+    %0:_(<12 x s16>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5
+    %1:_(<3 x s32>), %2:_(<3 x s32>) = G_UNMERGE_VALUES %0
+    $vgpr0_vgpr1_vgpr2 = COPY %1
+    $vgpr3_vgpr4_vgpr5 = COPY %2
+
+...

@ro-i ro-i requested a review from arsenm May 12, 2025 09:01
@ro-i
Copy link
Contributor Author

ro-i commented May 20, 2025

Ping

@ro-i
Copy link
Contributor Author

ro-i commented Jun 14, 2025

Ping (already updated the commit message, so this seems like a nice, small fix that is adapted to the feedback)

@jayfoad
Copy link
Contributor

jayfoad commented Jun 16, 2025

This commit rejects different source and destination vector elements for G_UNMERGE_VALUES, e.g.: %1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)

That case should already be rejected by MachineVerifier (

(SrcTy.getScalarType() != DstTy.getScalarType() &&
), therefore it is not legal and nothing should have created it in the first place.

@ro-i
Copy link
Contributor Author

ro-i commented Jun 16, 2025

But afaics, the MachineVerifier cannot catch invalid instructions that are created during legalization before they are being handled themselves in the same pass. Because that's what happens with my reproducer:

.. .. New MI: %645:_(<2 x s1>), %646:_(<2 x s1>), %647:_(<2 x s1>), %648:_(<2 x s1>), %649:_(<2 x s1>), %650:_(<2 x s1>), %651:_(<2 x s1>), %652:_(<2 x s1>), %653:_(<2 x s1>), %654:_(<2 x s1>), %655:_(<2 x s1>), %656:_(<2 x s1>), %657:_(<2 x s1>), %658:_(<2 x s1>), %659:_(<2 x s1>), %660:_(<2 x s1>) = G_UNMERGE_VALUES %87:_(<2 x s16>)
[...]
Legalizing: %645:_(<2 x s1>), %646:_(<2 x s1>), %647:_(<2 x s1>), %648:_(<2 x s1>), %649:_(<2 x s1>), %650:_(<2 x s1>), %651:_(<2 x s1>), %652:_(<2 x s1>), %653:_(<2 x s1>), %654:_(<2 x s1>), %655:_(<2 x s1>), %656:_(<2 x s1>), %657:_(<2 x s1>), %658:_(<2 x s1>), %659:_(<2 x s1>), %660:_(<2 x s1>) = G_UNMERGE_VALUES %87:_(<2 x s16>)
[<crash>]

@jayfoad
Copy link
Contributor

jayfoad commented Jun 16, 2025

But afaics, the MachineVerifier cannot catch invalid instructions that are created during legalization before they are being handled themselves in the same pass.

OK, but that's a technicality. The instructions are still invalid and should not have been created, so the correct fix is to not create them in the first place.

@ro-i
Copy link
Contributor Author

ro-i commented Jun 16, 2025

Yes, that's what the current version of this PR tries to do. That's why I added the check in tryCombineMergeLike, which prevents this unmerge from being built. I guess that there are multiple other possible places, so I'd be happy to implement this somewhere else if you think it would make more sense there!

@jayfoad
Copy link
Contributor

jayfoad commented Jun 16, 2025

Yes, that's what the current version of this PR tries to do.

OK, sounds good, but then please update the description. It's a bit misleading to say the patch rejects different source and destination vector elements for G_UNMERGE_VALUES.

@ro-i ro-i changed the title [GlobalISel]: G_UNMERGE_VALUES for vectors with different element sizes [GlobalISel] prevent G_UNMERGE_VALUES for vectors with different element sizes Jun 17, 2025
@ro-i ro-i changed the title [GlobalISel] prevent G_UNMERGE_VALUES for vectors with different element sizes [GlobalISel] prevent G_UNMERGE_VALUES for vectors with different elements Jun 17, 2025
@ro-i
Copy link
Contributor Author

ro-i commented Jun 17, 2025

Thanks for the feedback, should be clearer now

Copy link
Contributor

@jayfoad jayfoad left a comment

Choose a reason for hiding this comment

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

Seems reasonable

@ro-i ro-i merged commit 4d71f20 into llvm:main Jun 18, 2025
11 checks passed
@ro-i
Copy link
Contributor Author

ro-i commented Jun 18, 2025

merged, thanks for the reviews!

@ro-i ro-i deleted the unmerge-values-vector branch June 18, 2025 07:07
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder lld-x86_64-ubuntu-fast running on as-builder-4 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-expensive-checks-debian running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck -check-prefix=GPRIDX /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck -check-prefix=GPRIDX /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-amdgpu-runtime-2 running on rocm-worker-hw-02 while building llvm at step 8 "Add check check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck -check-prefix=GPRIDX /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/FileCheck -check-prefix=GPRIDX /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder ml-opt-devrel-x86-64 running on ml-opt-devrel-x86-64-b1 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/b/ml-opt-devrel-x86-64-b1/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck -check-prefix=GPRIDX /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck -check-prefix=GPRIDX /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /b/ml-opt-devrel-x86-64-b1/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder ml-opt-dev-x86-64 running on ml-opt-dev-x86-64-b1 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/b/ml-opt-dev-x86-64-b1/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck -check-prefix=GPRIDX /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck -check-prefix=GPRIDX /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /b/ml-opt-dev-x86-64-b1/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-expensive-checks-ubuntu running on as-builder-4 while building llvm at step 7 "test-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-check-all) failure: Test just built components: check-all completed (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/buildbot/worker/as-builder-4/ramdisk/expensive-checks/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building llvm at step 9 "Add check check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 9 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck -check-prefix=GPRIDX /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck -check-prefix=GPRIDX /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
�[1m/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: �[0m�[0;1;31merror: �[0m�[1mGPRIDX-NEXT: is not on the line after the previous match
�[0m; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
�[0;1;32m               ^
�[0m�[1m<stdin>:6451:2: �[0m�[0;1;30mnote: �[0m�[1m'next' match was here
�[0m s_load_dwordx16 s[12:27], s[8:9], 0x0
�[0;1;32m ^
�[0m�[1m<stdin>:6448:15: �[0m�[0;1;30mnote: �[0m�[1mprevious match ended here
�[0m; %bb.0: ; %bb
�[0;1;32m              ^
�[0m�[1m<stdin>:6449:1: �[0m�[0;1;30mnote: �[0m�[1mnon-matching line after previous match is here
�[0m s_add_u32 flat_scratch_lo, s12, s17
�[0;1;32m^
�[0m
Input file: <stdin>
Check file: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
�[1m�[0m�[0;1;30m              1: �[0m�[1m�[0;1;46m .section .AMDGPU.config,"",@progbits �[0m
�[0;1;30m              2: �[0m�[1m�[0;1;46m .long 45096 �[0m
�[0;1;30m              3: �[0m�[1m�[0;1;46m .long 64 �[0m
�[0;1;30m              4: �[0m�[1m�[0;1;46m .long 165608 �[0m
�[0;1;30m              5: �[0m�[1m�[0;1;46m .long 0 �[0m
�[0;1;30m              6: �[0m�[1m�[0;1;46m .long 45100 �[0m
�[0;1;30m              7: �[0m�[1m�[0;1;46m .long 0 �[0m
�[0;1;30m              8: �[0m�[1m�[0;1;46m .long 165580 �[0m
�[0;1;30m              9: �[0m�[1m�[0;1;46m .long 1 �[0m
�[0;1;30m             10: �[0m�[1m�[0;1;46m .long 165584 �[0m
�[0;1;30m             11: �[0m�[1m�[0;1;46m .long 1 �[0m
�[0;1;30m             12: �[0m�[1m�[0;1;46m .long 4 �[0m
�[0;1;30m             13: �[0m�[1m�[0;1;46m .long 0 �[0m
�[0;1;30m             14: �[0m�[1m�[0;1;46m .long 8 �[0m
�[0;1;30m             15: �[0m�[1m�[0;1;46m .long 0 �[0m
�[0;1;30m             16: �[0m�[1m�[0;1;46m .text �[0m
�[0;1;30m             17: �[0m�[1m�[0;1;46m .globl dyn_insertelement_v8i32_s_s_s ; -- Begin function dyn_insertelement_v8i32_s_s_s �[0m
�[0;1;30m             18: �[0m�[1m�[0;1;46m .p2align 8 �[0m
�[0;1;30m             19: �[0m�[1m�[0;1;46m .type dyn_insertelement_v8i32_s_s_s,@function �[0m
�[0;1;30m             20: �[0m�[1m�[0;1;46m�[0mdyn_insertelement_v8i32_s_s_s:�[0;1;46m ; @dyn_insertelement_v8i32_s_s_s �[0m
�[0;1;32mlabel:11'0       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
�[0m�[0;1;32mlabel:11'1       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building llvm at step 7 "test-build-unified-tree-check-llvm".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/b/1/llvm-x86_64-debian-dylib/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -check-prefix=GPRIDX /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /b/1/llvm-x86_64-debian-dylib/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -check-prefix=GPRIDX /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder clang-debian-cpp20 running on clang-debian-cpp20 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/FileCheck -check-prefix=GPRIDX /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/FileCheck -check-prefix=GPRIDX /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/b/1/clang-x86_64-debian-fast/llvm.obj/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -check-prefix=GPRIDX /b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -check-prefix=GPRIDX /b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder ppc64le-lld-multistage-test running on ppc64le-lld-multistage-test while building llvm at step 7 "test-build-stage1-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-stage1-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/FileCheck -check-prefix=GPRIDX /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/bin/FileCheck -check-prefix=GPRIDX /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...
Step 13 (test-build-stage2-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/llc -mtriple=amdgcn -mcpu=gfx900 < /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll | /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/FileCheck -check-prefix=SDAG /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll # RUN: at line 2
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/llc -mtriple=amdgcn -mcpu=gfx900
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/FileCheck -check-prefix=SDAG /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/llc -mtriple=amdgcn -mcpu=gfx900 -global-isel=1 -global-isel-abort=2 < /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll | /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/FileCheck -check-prefix=GISEL /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll # RUN: at line 3
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/llc -mtriple=amdgcn -mcpu=gfx900 -global-isel=1 -global-isel-abort=2
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage2/bin/FileCheck -check-prefix=GISEL /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll
warning: Instruction selection used fallback path for load_bf16
warning: Instruction selection used fallback path for store_bf16
warning: Instruction selection used fallback path for load_v4bf16
warning: Instruction selection used fallback path for store_v4bf16
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll:2169:15: error: GISEL-NEXT: is not on the line after the previous match
; GISEL-NEXT: buffer_load_ushort v4, off, s[16:19], 0 offset:4
              ^
<stdin>:4322:2: note: 'next' match was here
 buffer_load_ushort v4, off, s[16:19], 0 offset:4
 ^
<stdin>:4320:41: note: previous match ended here
 s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
                                        ^
<stdin>:4321:1: note: non-matching line after previous match is here
 buffer_load_dword v0, off, s[16:19], 0
^
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll:3633:15: error: GISEL-NEXT: is not on the line after the previous match
; GISEL-NEXT: s_waitcnt vmcnt(0)
              ^
<stdin>:6419:2: note: 'next' match was here
 s_waitcnt vmcnt(0)
 ^
<stdin>:6416:29: note: previous match ended here
 v_lshrrev_b32_e32 v1, 8, v0
                            ^
<stdin>:6417:1: note: non-matching line after previous match is here
 v_lshrrev_b32_e32 v2, 16, v0
^

Input file: <stdin>
Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/test/CodeGen/AMDGPU/buffer-fat-pointers-contents-legalization.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/FileCheck -check-prefix=GPRIDX /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@ro-i
Copy link
Contributor Author

ro-i commented Jun 18, 2025

something seems to be wrong. I'll investigate and reopen

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-global-isel running on linaro-clang-aarch64-global-isel while building llvm at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/FileCheck -check-prefix=GPRIDX /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/FileCheck -check-prefix=GPRIDX /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder ml-opt-rel-x86-64 running on ml-opt-rel-x86-64-b2 while building llvm at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/b/ml-opt-rel-x86-64-b1/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefix=GPRIDX /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /b/ml-opt-rel-x86-64-b1/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefix=GPRIDX /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-hwasan running on sanitizer-buildbot11 while building llvm at step 2 "annotate".

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

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-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 88069 tests, 72 workers --
Testing:  0.. 10.. 20.. 
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (27882 of 88069)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
Step 11 (stage2/hwasan check) failure: stage2/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 88069 tests, 72 workers --
Testing:  0.. 10.. 20.. 
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (27882 of 88069)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
Step 14 (stage3/hwasan check) failure: stage3/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 84964 tests, 72 workers --
Testing:  0.. 10.. 20.. 30
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (27945 of 84964)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build2_hwasan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building llvm at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/build/buildbot/premerge-monolithic-linux/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -check-prefix=GPRIDX /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /build/buildbot/premerge-monolithic-linux/build/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -check-prefix=GPRIDX /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
        6452:  s_load_dwordx2 s[0:1], s[8:9], 0x40 
        6453:  s_waitcnt lgkmcnt(0) 
        6454:  s_lshr_b32 s2, s12, 1 
        6455:  s_and_b32 s2, s2, 1 
        6456:  s_lshl_b32 s2, s2, 1 
           .
           .
           .
>>>>>>

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-ubsan running on sanitizer-buildbot9 while building llvm at step 2 "annotate".

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

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-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 88070 tests, 72 workers --
Testing:  0.. 10.. 20.. 
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (28006 of 88070)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
Step 11 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 88070 tests, 72 workers --
Testing:  0.. 10.. 20.. 
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (28006 of 88070)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
Step 14 (stage3/ubsan check) failure: stage3/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 84964 tests, 72 workers --
Testing:  0.. 10.. 20.. 30
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (28028 of 84964)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line

llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Jun 18, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 18, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-asan running on sanitizer-buildbot7 while building llvm at step 2 "annotate".

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

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-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 88070 tests, 72 workers --
Testing:  0.. 10.. 20.. 
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (27855 of 88070)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
Step 11 (stage2/asan check) failure: stage2/asan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 88070 tests, 72 workers --
Testing:  0.. 10.. 20.. 
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (27855 of 88070)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build_asan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
Step 14 (stage3/asan check) failure: stage3/asan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:520: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:73: 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: 84964 tests, 72 workers --
Testing:  0.. 10.. 20.. 30
FAIL: LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll (27948 of 84964)
******************** TEST 'LLVM :: CodeGen/AMDGPU/GlobalISel/insertelement.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs < /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll | /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll # RUN: at line 2
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/llc -global-isel -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -verify-machineinstrs
+ /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm_build2_asan/bin/FileCheck -check-prefix=GPRIDX /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
/home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll:6514:16: error: GPRIDX-NEXT: is not on the line after the previous match
; GPRIDX-NEXT: s_load_dwordx16 s[12:27], s[8:9], 0x0
               ^
<stdin>:6451:2: note: 'next' match was here
 s_load_dwordx16 s[12:27], s[8:9], 0x0
 ^
<stdin>:6448:15: note: previous match ended here
; %bb.0: ; %bb
              ^
<stdin>:6449:1: note: non-matching line after previous match is here
 s_add_u32 flat_scratch_lo, s12, s17
^

Input file: <stdin>
Check file: /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
        6446:  runtime_loader_kernel_symbol = 0 
        6447:  .end_amd_kernel_code_t 
        6448: ; %bb.0: ; %bb 
        6449:  s_add_u32 flat_scratch_lo, s12, s17 
        6450:  s_addc_u32 flat_scratch_hi, s13, 0 
        6451:  s_load_dwordx16 s[12:27], s[8:9], 0x0 
next:6514      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line

fschlimb pushed a commit to fschlimb/llvm-project that referenced this pull request Jun 18, 2025
…ents (llvm#133335)

This commit prevents building a G_UNMERGE_VALUES instruction with
different source and destination vector elements in
`LegalizationArtifactCombiner::ArtifactValueFinder::tryCombineMergeLike()`,
e.g.:
`%1:_(<2 x s8>), %2:_(<2 x s8>) = G_UNMERGE_VALUES %0:_(<2 x s16>)`

This LLVM defect was identified via the AMD Fuzzing project.
fschlimb pushed a commit to fschlimb/llvm-project that referenced this pull request Jun 18, 2025
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.

5 participants