[llvm] [AArch64][GlobalISel] Add tablegen patterns for smull+sqshrn -> sqdmulh. (PR #217318)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 02:22:50 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 140336 tests passed
* 3707 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CodeGen/AArch64/abi-classify-arg-types.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -triple arm64-apple-ios7.0 -target-abi darwinpcs -fenable-matrix -fexperimental-max-bitint-width=1024 -emit-llvm -o - C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.c | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.c --check-prefixes=CHECK,DARWIN,LONG64
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -triple arm64-apple-ios7.0 -target-abi darwinpcs -fenable-matrix -fexperimental-max-bitint-width=1024 -emit-llvm -o - 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.c'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.c' --check-prefixes=CHECK,DARWIN,LONG64
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.c:112:11: error: CHECK: expected string not found in input
# | // CHECK: define{{.*}} void @arg_bitint129(ptr nofree noundef align 16 dead_on_return dereferenceable(32) %{{.*}})
# | ^
# | <stdin>:186:44: note: scanning from here
# | define void @arg_bitint128(i128 noundef %x) #0 {
# | ^
# | <stdin>:194:1: note: possible intended match here
# | define void @arg_bitint129(ptr nofreeobj noundef align 16 dead_on_return dereferenceable(32) %0) #0 {
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 181: store i128 %storedv, ptr %x.addr, align 16
# | 182: ret void
# | 183: }
# | 184:
# | 185: ; Function Attrs: noinline nounwind optnone
# | 186: define void @arg_bitint128(i128 noundef %x) #0 {
# | check:112'0 { search range start (exclusive)
# | check:112'1 error: no match found in search range
# | 187: entry:
# | 188: %x.addr = alloca i128, align 16
# | 189: store i128 %x, ptr %x.addr, align 16
# | 190: ret void
# | 191: }
# | 192:
# | 193: ; Function Attrs: noinline nounwind optnone
# | 194: define void @arg_bitint129(ptr nofreeobj noundef align 16 dead_on_return dereferenceable(32) %0) #0 {
# | check:112'2 ? possible intended match
# | 195: entry:
# | 196: %x.addr = alloca i256, align 16
# | 197: %1 = load i256, ptr %0, align 16
# | 198: %x = trunc i256 %1 to i129
# | 199: %storedv = sext i129 %x to i256
# | 200: store i256 %storedv, ptr %x.addr, align 16
# | 201: ret void
# | 202: }
# | 203:
# | 204: attributes #0 = { noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
# | 205:
# | 206: !llvm.ident = !{!0}
# | 207:
# | 208: !0 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project 511bd9e02866e50cac4ba70d63fd8f51be79e625)"}
# | check:112'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CodeGen/AArch64/abi-classify-arg-types.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\24\include -nostdsysteminc -triple arm64-apple-ios7.0 -target-abi darwinpcs -emit-llvm -o - C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\24\include' -nostdsysteminc -triple arm64-apple-ios7.0 -target-abi darwinpcs -emit-llvm -o - 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp:39:11: error: CHECK: expected string not found in input
# | // CHECK: define{{.*}} void @arg_nontrivial_copy(ptr nofree noundef align 4 dead_on_return dereferenceable(4) %{{.*}})
# | ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp'
# | ^
# | <stdin>:7:1: note: possible intended match here
# | define void @arg_nontrivial_copy(ptr nofreeobj noundef align 4 dead_on_return dereferenceable(4) %a) #0 {
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\AArch64\abi-classify-arg-types.cpp'
# | check:39'0 { search range start (exclusive)
# | check:39'1 error: no match found in search range
# | 2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\CodeGen\\AArch64\\abi-classify-arg-types.cpp"
# | 3: target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
# | 4: target triple = "arm64-apple-ios7.0"
# | 5:
# | 6: ; Function Attrs: mustprogress noinline nounwind optnone
# | 7: define void @arg_nontrivial_copy(ptr nofreeobj noundef align 4 dead_on_return dereferenceable(4) %a) #0 {
# | check:39'2 ? possible intended match
# | 8: entry:
# | 9: %a.indirect_addr = alloca ptr, align 8
# | 10: store ptr %a, ptr %a.indirect_addr, align 8
# | 11: ret void
# | 12: }
# | .
# | .
# | .
# | 29:
# | 30: attributes #0 = { mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
# | 31:
# | 32: !llvm.ident = !{!0}
# | 33:
# | 34: !0 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project 511bd9e02866e50cac4ba70d63fd8f51be79e625)"}
# | check:39'3 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
### LLVM
<details>
<summary>LLVM.CodeGen/AArch64/saturating-vec-smull.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=aarch64-none-elf < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll --check-prefixes=CHECK,CHECK-SD
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=aarch64-none-elf
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll' --check-prefixes=CHECK,CHECK-SD
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=aarch64-none-elf -global-isel -global-isel-abort=2 2>&1 < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll --check-prefixes=CHECK,CHECK-GI
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=aarch64-none-elf -global-isel -global-isel-abort=2
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll' --check-prefixes=CHECK,CHECK-GI
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll:40:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: sqdmulh v0.4h, v1.4h, v0.4h
# | ^
# | <stdin>:28:10: note: scanning from here
# | // %bb.0:
# | ^
# | <stdin>:29:2: note: possible intended match here
# | smull v0.4s, v1.4h, v0.4h
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll:54:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: sqdmulh v0.8h, v1.8h, v0.8h
# | ^
# | <stdin>:44:10: note: scanning from here
# | // %bb.0:
# | ^
# | <stdin>:46:2: note: possible intended match here
# | smull2 v0.4s, v1.8h, v0.8h
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll:68:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: sqdmulh v0.2s, v1.2s, v0.2s
# | ^
# | <stdin>:71:10: note: scanning from here
# | // %bb.0:
# | ^
# | <stdin>:72:2: note: possible intended match here
# | smull v0.2d, v1.2s, v0.2s
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll:82:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: sqdmulh v0.4s, v1.4s, v0.4s
# | ^
# | <stdin>:97:10: note: scanning from here
# | // %bb.0:
# | ^
# | <stdin>:99:2: note: possible intended match here
# | smull2 v0.2d, v1.4s, v0.4s
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll:102:18: error: CHECK-GI-NEXT: expected string not found in input
# | ; CHECK-GI-NEXT: sqdmulh v0.4s, v2.4s, v0.4s
# | ^
# | <stdin>:127:10: note: scanning from here
# | // %bb.0:
# | ^
# | <stdin>:129:2: note: possible intended match here
# | smull2 v0.2d, v2.4s, v0.4s
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AArch64\saturating-vec-smull.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 23: .globl saturating_4xi16 // -- Begin function saturating_4xi16
# | 24: .p2align 2
# | 25: .type saturating_4xi16, at function
# | 26: saturating_4xi16: // @saturating_4xi16
# | 27: .cfi_startproc
# | 28: // %bb.0:
# | next:40'0 { search range start (exclusive)
# | next:40'1 error: no match found in search range
# | 29: smull v0.4s, v1.4h, v0.4h
# | next:40'2 ? possible intended match
# | 30: movi v1.4s, #127, msl #8
# | 31: sshr v0.4s, v0.4s, #15
# | 32: smin v0.4s, v0.4s, v1.4s
# | 33: xtn v0.4h, v0.4s
# | 34: ret
# | 35: .Lfunc_end1:
# | 36: .size saturating_4xi16, .Lfunc_end1-saturating_4xi16
# | 37: .cfi_endproc
# | 38: // -- End function
# | 39: .globl saturating_8xi16 // -- Begin function saturating_8xi16
# | 40: .p2align 2
# | 41: .type saturating_8xi16, at function
# | 42: saturating_8xi16: // @saturating_8xi16
# | next:40'3 } search range end (exclusive)
# | 43: .cfi_startproc
# | 44: // %bb.0:
# | next:54'0 { search range start (exclusive)
# | next:54'1 error: no match found in search range
# | 45: smull v3.4s, v1.4h, v0.4h
# | 46: smull2 v0.4s, v1.8h, v0.8h
# | next:54'2 ? possible intended match
# | 47: movi v2.4s, #127, msl #8
# | 48: sshr v1.4s, v3.4s, #15
# | 49: sshr v0.4s, v0.4s, #15
# | 50: smin v1.4s, v1.4s, v2.4s
# | 51: smin v0.4s, v0.4s, v2.4s
# | .
# | .
# | .
# | 64: .size .LCPI3_0, 16
# | 65: .text
# | 66: .globl saturating_2xi32
# | 67: .p2align 2
# | 68: .type saturating_2xi32, at function
# | 69: saturating_2xi32: // @saturating_2xi32
# | next:54'3 } search range end (exclusive)
# | 70: .cfi_startproc
# | 71: // %bb.0:
# | next:68'0 { search range start (exclusive)
# | next:68'1 error: no match found in search range
# | 72: smull v0.2d, v1.2s, v0.2s
# | next:68'2 ? possible intended match
# | 73: adrp x8, .LCPI3_0
# | 74: ldr q1, [x8, :lo12:.LCPI3_0]
# | 75: sshr v0.2d, v0.2d, #31
# | 76: cmgt v2.2d, v1.2d, v0.2d
# | 77: bif v0.16b, v1.16b, v2.16b
# | .
# | .
# | .
# | 90: .size .LCPI4_0, 16
# | 91: .text
# | 92: .globl saturating_4xi32
# | 93: .p2align 2
# | 94: .type saturating_4xi32, at function
# | 95: saturating_4xi32: // @saturating_4xi32
# | next:68'3 } search range end (exclusive)
# | 96: .cfi_startproc
# | 97: // %bb.0:
# | next:82'0 { search range start (exclusive)
# | next:82'1 error: no match found in search range
# | 98: smull v2.2d, v1.2s, v0.2s
# | 99: smull2 v0.2d, v1.4s, v0.4s
# | next:82'2 ? possible intended match
# | 100: adrp x8, .LCPI4_0
# | 101: sshr v1.2d, v2.2d, #31
# | 102: sshr v0.2d, v0.2d, #31
# | 103: ldr q2, [x8, :lo12:.LCPI4_0]
# | 104: cmgt v3.2d, v2.2d, v1.2d
# | .
# | .
# | .
# | 120: .size .LCPI5_0, 16
# | 121: .text
# | 122: .globl saturating_8xi32
# | 123: .p2align 2
# | 124: .type saturating_8xi32, at function
# | 125: saturating_8xi32: // @saturating_8xi32
# | next:82'3 } search range end (exclusive)
# | 126: .cfi_startproc
# | 127: // %bb.0:
# | next:102'0 { search range start (exclusive)
# | next:102'1 error: no match found in search range
# | 128: smull v4.2d, v2.2s, v0.2s
# | 129: smull2 v0.2d, v2.4s, v0.4s
# | next:102'2 ? possible intended match
# | 130: adrp x8, .LCPI5_0
# | 131: smull v2.2d, v3.2s, v1.2s
# | 132: smull2 v1.2d, v3.4s, v1.4s
# | 133: ldr q3, [x8, :lo12:.LCPI5_0]
# | 134: sshr v4.2d, v4.2d, #31
# | .
# | .
# | .
# | 159: .size .LCPI6_0, 16
# | 160: .text
# | 161: .globl saturating_2xi32_2xi64
# | 162: .p2align 2
# | 163: .type saturating_2xi32_2xi64, at function
# | 164: saturating_2xi32_2xi64: // @saturating_2xi32_2xi64
# | next:102'3 } search range end (exclusive)
# | 165: .cfi_startproc
# | 166: // %bb.0:
# | 167: smull v0.2d, v1.2s, v0.2s
# | 168: adrp x8, .LCPI6_0
# | 169: ldr q1, [x8, :lo12:.LCPI6_0]
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/217318
More information about the llvm-commits
mailing list