Skip to content

[GlobalISel] Add G_CONCAT_VECTOR handling in computeNumSignBits #142355

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 2 commits into from
Jun 4, 2025

Conversation

usha1830
Copy link
Contributor

@usha1830 usha1830 commented Jun 2, 2025

Code ported from SelectionDAG::ComputeNumSignBits

@llvmbot
Copy link
Member

llvmbot commented Jun 2, 2025

@llvm/pr-subscribers-backend-aarch64

@llvm/pr-subscribers-llvm-globalisel

Author: Usha Gupta (usha1830)

Changes

Code ported from SelectionDAG::ComputeNumSignBits


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

7 Files Affected:

  • (modified) llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp (+21)
  • (modified) llvm/test/CodeGen/AArch64/GlobalISel/knownbits-concat.mir (+2-2)
  • (modified) llvm/test/CodeGen/AArch64/GlobalISel/legalize-min-max.mir (+16-24)
  • (modified) llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll (-2)
  • (modified) llvm/test/CodeGen/AArch64/fcmp.ll (+7-11)
  • (modified) llvm/test/CodeGen/AArch64/scmp.ll (-4)
  • (modified) llvm/test/CodeGen/AArch64/ucmp.ll (-4)
diff --git a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
index 692befde71cb1..50c2f452ee18e 100644
--- a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
@@ -1958,6 +1958,27 @@ unsigned GISelValueTracking::computeNumSignBits(Register R,
     }
     break;
   }
+  case TargetOpcode::G_CONCAT_VECTORS: {
+    if (MRI.getType(MI.getOperand(0).getReg()).isScalableVector())
+      break;
+    FirstAnswer = std::numeric_limits<unsigned>::max();
+    // Determine the minimum number of sign bits across all demanded
+    // elts of the input vectors. Early out if the result is already 1.
+    unsigned NumSubVectorElts =
+        MRI.getType(MI.getOperand(1).getReg()).getNumElements();
+    unsigned NumSubVectors = MI.getNumOperands() - 1;
+    for (unsigned i = 0; (i < NumSubVectors); ++i) {
+      APInt DemandedSub =
+          DemandedElts.extractBits(NumSubVectorElts, i * NumSubVectorElts);
+      if (!DemandedSub)
+        continue;
+      unsigned Tmp2 = computeNumSignBits(MI.getOperand(i + 1).getReg(),
+                                         DemandedSub, Depth + 1);
+
+      FirstAnswer = std::min(FirstAnswer, Tmp2);
+    }
+    break;
+  }
   case TargetOpcode::G_SHUFFLE_VECTOR: {
     // Collect the minimum number of sign bits that are shared by every vector
     // element referenced by the shuffle.
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/knownbits-concat.mir b/llvm/test/CodeGen/AArch64/GlobalISel/knownbits-concat.mir
index 85129e9639a6a..03f7533c7d604 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/knownbits-concat.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/knownbits-concat.mir
@@ -42,7 +42,7 @@ body: |
   ; CHECK-NEXT: %1:_ KnownBits:???????? SignBits:1
   ; CHECK-NEXT: %sext0:_ KnownBits:???????????????? SignBits:9
   ; CHECK-NEXT: %sext1:_ KnownBits:???????????????? SignBits:9
-  ; CHECK-NEXT: %res:_ KnownBits:???????????????? SignBits:1
+  ; CHECK-NEXT: %res:_ KnownBits:???????????????? SignBits:9
     %0:_(<2 x s8>) = COPY $h0
     %1:_(<2 x s8>) = COPY $h1
     %sext0:_(<2 x s16>) = G_SEXT %0
@@ -60,7 +60,7 @@ body: |
   ; CHECK-NEXT: %1:_ KnownBits:???????? SignBits:1
   ; CHECK-NEXT: %zext0:_ KnownBits:00000000???????? SignBits:8
   ; CHECK-NEXT: %sext1:_ KnownBits:???????????????? SignBits:9
-  ; CHECK-NEXT: %res:_ KnownBits:???????????????? SignBits:1
+  ; CHECK-NEXT: %res:_ KnownBits:???????????????? SignBits:8
     %0:_(<2 x s8>) = COPY $h0
     %1:_(<2 x s8>) = COPY $h1
     %zext0:_(<2 x s16>) = G_ZEXT %0
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-min-max.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-min-max.mir
index 4a3457a35256d..fae979d38c6ea 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-min-max.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-min-max.mir
@@ -249,14 +249,12 @@ body: |
     ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
     ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(slt), [[DEF]](<2 x s64>), [[DEF]]
     ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(slt), [[DEF]](<2 x s64>), [[DEF]]
-    ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP]], 1
-    ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP1]], 1
     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
     ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
-    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG1]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG]]
-    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG1]]
+    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP1]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP1]]
     ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR]]
     ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR1]]
     ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[AND]], [[AND2]]
@@ -521,14 +519,12 @@ body: |
     ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
     ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(ult), [[DEF]](<2 x s64>), [[DEF]]
     ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(ult), [[DEF]](<2 x s64>), [[DEF]]
-    ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP]], 1
-    ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP1]], 1
     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
     ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
-    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG1]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG]]
-    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG1]]
+    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP1]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP1]]
     ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR]]
     ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR1]]
     ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[AND]], [[AND2]]
@@ -793,14 +789,12 @@ body: |
     ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
     ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(sgt), [[DEF]](<2 x s64>), [[DEF]]
     ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(sgt), [[DEF]](<2 x s64>), [[DEF]]
-    ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP]], 1
-    ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP1]], 1
     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
     ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
-    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG1]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG]]
-    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG1]]
+    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP1]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP1]]
     ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR]]
     ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR1]]
     ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[AND]], [[AND2]]
@@ -1065,14 +1059,12 @@ body: |
     ; CHECK-NEXT: [[DEF:%[0-9]+]]:_(<2 x s64>) = G_IMPLICIT_DEF
     ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(ugt), [[DEF]](<2 x s64>), [[DEF]]
     ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(<2 x s64>) = G_ICMP intpred(ugt), [[DEF]](<2 x s64>), [[DEF]]
-    ; CHECK-NEXT: [[SEXT_INREG:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP]], 1
-    ; CHECK-NEXT: [[SEXT_INREG1:%[0-9]+]]:_(<2 x s64>) = G_SEXT_INREG [[ICMP1]], 1
     ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -1
     ; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[C]](s64), [[C]](s64)
-    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[SEXT_INREG1]], [[BUILD_VECTOR]]
-    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG]]
-    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[SEXT_INREG1]]
+    ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[XOR1:%[0-9]+]]:_(<2 x s64>) = G_XOR [[ICMP1]], [[BUILD_VECTOR]]
+    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP]]
+    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[ICMP1]]
     ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR]]
     ; CHECK-NEXT: [[AND3:%[0-9]+]]:_(<2 x s64>) = G_AND [[DEF]], [[XOR1]]
     ; CHECK-NEXT: [[OR:%[0-9]+]]:_(<2 x s64>) = G_OR [[AND]], [[AND2]]
diff --git a/llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll b/llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll
index 295863f18fd41..be79135c8b831 100644
--- a/llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll
+++ b/llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll
@@ -335,8 +335,6 @@ define void @typei1_orig(i64 %a, ptr %p, ptr %q) {
 ; CHECK-GI-NEXT:    cmtst v0.8h, v0.8h, v0.8h
 ; CHECK-GI-NEXT:    mvn v1.16b, v1.16b
 ; CHECK-GI-NEXT:    uzp1 v0.16b, v0.16b, v1.16b
-; CHECK-GI-NEXT:    shl v0.16b, v0.16b, #7
-; CHECK-GI-NEXT:    sshr v0.16b, v0.16b, #7
 ; CHECK-GI-NEXT:    str q0, [x1]
 ; CHECK-GI-NEXT:    ret
   %tmp = xor <16 x i1> zeroinitializer, <i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true, i1 true>
diff --git a/llvm/test/CodeGen/AArch64/fcmp.ll b/llvm/test/CodeGen/AArch64/fcmp.ll
index e16ea9883a0c4..b9d65fa0314c4 100644
--- a/llvm/test/CodeGen/AArch64/fcmp.ll
+++ b/llvm/test/CodeGen/AArch64/fcmp.ll
@@ -969,8 +969,6 @@ define <4 x i32> @v4f64_i32(<4 x double> %a, <4 x double> %b, <4 x i32> %d, <4 x
 ; CHECK-GI-NEXT:    fcmgt v0.2d, v2.2d, v0.2d
 ; CHECK-GI-NEXT:    fcmgt v1.2d, v3.2d, v1.2d
 ; CHECK-GI-NEXT:    uzp1 v0.4s, v0.4s, v1.4s
-; CHECK-GI-NEXT:    shl v0.4s, v0.4s, #31
-; CHECK-GI-NEXT:    sshr v0.4s, v0.4s, #31
 ; CHECK-GI-NEXT:    bsl v0.16b, v4.16b, v5.16b
 ; CHECK-GI-NEXT:    ret
 entry:
@@ -1291,8 +1289,6 @@ define <8 x half> @v8f16_half(<8 x half> %a, <8 x half> %b, <8 x half> %d, <8 x
 ; CHECK-GI-NOFP16-NEXT:    fcmgt v4.4s, v5.4s, v4.4s
 ; CHECK-GI-NOFP16-NEXT:    fcmgt v0.4s, v1.4s, v0.4s
 ; CHECK-GI-NOFP16-NEXT:    uzp1 v0.8h, v4.8h, v0.8h
-; CHECK-GI-NOFP16-NEXT:    shl v0.8h, v0.8h, #15
-; CHECK-GI-NOFP16-NEXT:    sshr v0.8h, v0.8h, #15
 ; CHECK-GI-NOFP16-NEXT:    bsl v0.16b, v2.16b, v3.16b
 ; CHECK-GI-NOFP16-NEXT:    ret
 ;
@@ -1341,9 +1337,9 @@ define <16 x half> @v16f16_half(<16 x half> %a, <16 x half> %b, <16 x half> %d,
 ; CHECK-GI-NOFP16-NEXT:    fcvtl v16.4s, v0.4h
 ; CHECK-GI-NOFP16-NEXT:    fcvtl2 v0.4s, v0.8h
 ; CHECK-GI-NOFP16-NEXT:    fcvtl v17.4s, v1.4h
-; CHECK-GI-NOFP16-NEXT:    fcvtl2 v1.4s, v1.8h
 ; CHECK-GI-NOFP16-NEXT:    fcvtl v18.4s, v2.4h
 ; CHECK-GI-NOFP16-NEXT:    fcvtl2 v2.4s, v2.8h
+; CHECK-GI-NOFP16-NEXT:    fcvtl2 v1.4s, v1.8h
 ; CHECK-GI-NOFP16-NEXT:    fcvtl v19.4s, v3.4h
 ; CHECK-GI-NOFP16-NEXT:    fcvtl2 v3.4s, v3.8h
 ; CHECK-GI-NOFP16-NEXT:    fcmgt v16.4s, v18.4s, v16.4s
@@ -1352,12 +1348,12 @@ define <16 x half> @v16f16_half(<16 x half> %a, <16 x half> %b, <16 x half> %d,
 ; CHECK-GI-NOFP16-NEXT:    fcmgt v1.4s, v3.4s, v1.4s
 ; CHECK-GI-NOFP16-NEXT:    uzp1 v0.8h, v16.8h, v0.8h
 ; CHECK-GI-NOFP16-NEXT:    uzp1 v1.8h, v2.8h, v1.8h
-; CHECK-GI-NOFP16-NEXT:    shl v0.8h, v0.8h, #15
-; CHECK-GI-NOFP16-NEXT:    shl v1.8h, v1.8h, #15
-; CHECK-GI-NOFP16-NEXT:    sshr v0.8h, v0.8h, #15
-; CHECK-GI-NOFP16-NEXT:    sshr v1.8h, v1.8h, #15
-; CHECK-GI-NOFP16-NEXT:    bsl v0.16b, v4.16b, v6.16b
-; CHECK-GI-NOFP16-NEXT:    bsl v1.16b, v5.16b, v7.16b
+; CHECK-GI-NOFP16-NEXT:    and v2.16b, v4.16b, v0.16b
+; CHECK-GI-NOFP16-NEXT:    bic v0.16b, v6.16b, v0.16b
+; CHECK-GI-NOFP16-NEXT:    and v3.16b, v5.16b, v1.16b
+; CHECK-GI-NOFP16-NEXT:    bic v1.16b, v7.16b, v1.16b
+; CHECK-GI-NOFP16-NEXT:    orr v0.16b, v2.16b, v0.16b
+; CHECK-GI-NOFP16-NEXT:    orr v1.16b, v3.16b, v1.16b
 ; CHECK-GI-NOFP16-NEXT:    ret
 ;
 ; CHECK-GI-FP16-LABEL: v16f16_half:
diff --git a/llvm/test/CodeGen/AArch64/scmp.ll b/llvm/test/CodeGen/AArch64/scmp.ll
index 7a73578f43e80..73cbd2cbeee48 100644
--- a/llvm/test/CodeGen/AArch64/scmp.ll
+++ b/llvm/test/CodeGen/AArch64/scmp.ll
@@ -310,10 +310,6 @@ define <16 x i8> @signOf_neon_scmp(<8 x i16> %s0_lo, <8 x i16> %s0_hi, <8 x i16>
 ; CHECK-GI-NEXT:    cmgt v1.8h, v3.8h, v1.8h
 ; CHECK-GI-NEXT:    uzp1 v0.16b, v0.16b, v1.16b
 ; CHECK-GI-NEXT:    uzp1 v1.16b, v4.16b, v5.16b
-; CHECK-GI-NEXT:    shl v0.16b, v0.16b, #7
-; CHECK-GI-NEXT:    shl v1.16b, v1.16b, #7
-; CHECK-GI-NEXT:    sshr v0.16b, v0.16b, #7
-; CHECK-GI-NEXT:    sshr v1.16b, v1.16b, #7
 ; CHECK-GI-NEXT:    sub v0.16b, v0.16b, v1.16b
 ; CHECK-GI-NEXT:    ret
 entry:
diff --git a/llvm/test/CodeGen/AArch64/ucmp.ll b/llvm/test/CodeGen/AArch64/ucmp.ll
index ad46e4abc477c..af8225307fedd 100644
--- a/llvm/test/CodeGen/AArch64/ucmp.ll
+++ b/llvm/test/CodeGen/AArch64/ucmp.ll
@@ -348,10 +348,6 @@ define <16 x i8> @signOf_neon(<8 x i16> %s0_lo, <8 x i16> %s0_hi, <8 x i16> %s1_
 ; CHECK-GI-NEXT:    cmhi v1.8h, v3.8h, v1.8h
 ; CHECK-GI-NEXT:    uzp1 v0.16b, v0.16b, v1.16b
 ; CHECK-GI-NEXT:    uzp1 v1.16b, v4.16b, v5.16b
-; CHECK-GI-NEXT:    shl v0.16b, v0.16b, #7
-; CHECK-GI-NEXT:    shl v1.16b, v1.16b, #7
-; CHECK-GI-NEXT:    sshr v0.16b, v0.16b, #7
-; CHECK-GI-NEXT:    sshr v1.16b, v1.16b, #7
 ; CHECK-GI-NEXT:    sub v0.16b, v0.16b, v1.16b
 ; CHECK-GI-NEXT:    ret
 entry:

Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

Thanks - LGTM

@davemgreen davemgreen merged commit cf348e8 into llvm:main Jun 4, 2025
11 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jun 4, 2025

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building llvm at step 6 "test".

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

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Python/Crashlog/json.test (2983 of 2992)
UNSUPPORTED: lldb-shell :: Heap/heap-cstr.test (2984 of 2992)
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Lua/breakpoint_oneline_callback.test (2985 of 2992)
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Python/Crashlog/parser_text.test (2986 of 2992)
UNSUPPORTED: lldb-shell :: ScriptInterpreter/Lua/breakpoint_function_callback.test (2987 of 2992)
PASS: lldb-api :: api/multithreaded/TestMultithreaded.py (2988 of 2992)
PASS: lldb-api :: terminal/TestEditlineCompletions.py (2989 of 2992)
PASS: lldb-api :: commands/process/attach/TestProcessAttach.py (2990 of 2992)
PASS: lldb-api :: repl/clang/TestClangREPL.py (2991 of 2992)
TIMEOUT: lldb-shell :: Settings/TestCxxFrameFormatRecursive.test (2992 of 2992)
******************** TEST 'lldb-shell :: Settings/TestCxxFrameFormatRecursive.test' FAILED ********************
Exit Code: -9
Timeout: Reached timeout of 600 seconds

Command Output (stderr):
--
split-file /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/Shell/Settings/TestCxxFrameFormatRecursive.test /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp # RUN: at line 6
+ split-file /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/Shell/Settings/TestCxxFrameFormatRecursive.test /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp
/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-unknown-linux-gnu -pthread -fmodules-cache-path=/home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-shell -g -gdwarf /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp/main.cpp -o /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp.out # RUN: at line 7
+ /home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang --target=specify-a-target-or-use-a-_host-substitution --target=x86_64-unknown-linux-gnu -pthread -fmodules-cache-path=/home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-shell -g -gdwarf /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp/main.cpp -o /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp.out
clang: warning: argument unused during compilation: '-fmodules-cache-path=/home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-shell' [-Wunused-command-line-argument]
/home/worker/2.0.1/lldb-x86_64-debian/build/bin/lldb --no-lldbinit -S /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/lit-lldb-init-quiet -o "settings set interpreter.stop-command-source-on-error false"        -x -b -s /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp/commands.input /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp.out -o exit 2>&1        | /home/worker/2.0.1/lldb-x86_64-debian/build/bin/FileCheck /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/Shell/Settings/TestCxxFrameFormatRecursive.test # RUN: at line 8
+ /home/worker/2.0.1/lldb-x86_64-debian/build/bin/lldb --no-lldbinit -S /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/lit-lldb-init-quiet -o 'settings set interpreter.stop-command-source-on-error false' -x -b -s /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp/commands.input /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/Shell/Settings/Output/TestCxxFrameFormatRecursive.test.tmp.out -o exit
+ /home/worker/2.0.1/lldb-x86_64-debian/build/bin/FileCheck /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/Shell/Settings/TestCxxFrameFormatRecursive.test

--

********************
********************
Timed Out Tests (1):
  lldb-shell :: Settings/TestCxxFrameFormatRecursive.test


Testing Time: 637.92s

Total Discovered Tests: 33276
  Skipped          :     2 (0.01%)
  Unsupported      :   458 (1.38%)
  Passed           : 32790 (98.54%)
  Expectedly Failed:    25 (0.08%)
  Timed Out        :     1 (0.00%)
FAILED: tools/lldb/test/CMakeFiles/check-lldb /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test/CMakeFiles/check-lldb 
cd /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test && /usr/bin/python3 /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/llvm-lit -v /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/test
ninja: build stopped: subcommand failed.

@usha1830
Copy link
Contributor Author

usha1830 commented Jun 4, 2025

1 test failed due to timeout. Looks like an intermittent and unrelated issue

Timed Out Tests (1):
  lldb-shell :: Settings/TestCxxFrameFormatRecursive.test

unsigned NumSubVectorElts =
MRI.getType(MI.getOperand(1).getReg()).getNumElements();
unsigned NumSubVectors = MI.getNumOperands() - 1;
for (unsigned i = 0; i < NumSubVectors; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
for (unsigned i = 0; i < NumSubVectors; ++i) {
for (unsigned I = 0; I < NumSubVectors; ++I) {

arsenm pushed a commit that referenced this pull request Jun 6, 2025
…tyle consistency (#143113)

Following up on a comment on
#142355.
Updated other instances in the file as well.

@jayfoad
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Jun 6, 2025
…g.cpp for style consistency (#143113)

Following up on a comment on
llvm/llvm-project#142355.
Updated other instances in the file as well.

@jayfoad
rorth pushed a commit to rorth/llvm-project that referenced this pull request Jun 11, 2025
rorth pushed a commit to rorth/llvm-project that referenced this pull request Jun 11, 2025
…tyle consistency (llvm#143113)

Following up on a comment on
llvm#142355.
Updated other instances in the file as well.

@jayfoad
DhruvSrivastavaX pushed a commit to DhruvSrivastavaX/lldb-for-aix that referenced this pull request Jun 12, 2025
DhruvSrivastavaX pushed a commit to DhruvSrivastavaX/lldb-for-aix that referenced this pull request Jun 12, 2025
…tyle consistency (llvm#143113)

Following up on a comment on
llvm#142355.
Updated other instances in the file as well.

@jayfoad
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
…tyle consistency (llvm#143113)

Following up on a comment on
llvm#142355.
Updated other instances in the file as well.

@jayfoad
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