| Issue |
52919
|
| Summary |
LLVM trunk no longer generates addhn on aarch64
|
| Labels |
|
| Assignees |
|
| Reporter |
alexreinking
|
The following code snippet no longer produces addhn instructions, as before:
```
define <4 x i32> @square(<2 x i64> %x, <2 x i64> %z) {
%y = add <2 x i64> %x, <i64 32, i64 32>
%i0 = add <2 x i64> %x, %y
%i1 = lshr <2 x i64> %i0, <i64 32, i64 32>
%i2 = trunc <2 x i64> %i1 to <2 x i32>
%i3 = add <2 x i64> %z, %y
%i4 = lshr <2 x i64> %i3, <i64 32, i64 32>
%i5 = trunc <2 x i64> %i4 to <2 x i32>
%i6 = shufflevector <2 x i32> %i2, <2 x i32> %i5, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
ret <4 x i32> %i6
}
```
Trunk:
```
square: // @square
mov w8, #32
dup v2.2d, x8
add v2.2d, v0.2d, v2.2d
add v0.2d, v0.2d, v2.2d
add v1.2d, v1.2d, v2.2d
uzp2 v0.4s, v0.4s, v1.4s
ret
```
LLC 13.0.0
```
square: // @square
mov w8, #32
dup v2.2d, x8
add v2.2d, v0.2d, v2.2d
addhn v0.2s, v0.2d, v2.2d
addhn2 v0.4s, v1.2d, v2.2d
ret
```
First bad commit is: ada028c32f47ca84a0b7be5d1ab4e3c943f859a3 [AArch64] Add a tablegen pattern for UZP2. Bisected by @LebedevRI
Found during nightly Halide testing in PR halide/Halide#6519
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs