Skip to content

Commit 4df696f

Browse files
[NFC] Move a test case across files.
The test case is about pmull2 instruction generated used than a SIMD ldr being generated. So aarch64-pmull2.ll is a better test file. Differential Revision: https://reviews.llvm.org/D132277
1 parent 1c66bac commit 4df696f

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

llvm/test/CodeGen/AArch64/aarch64-pmull2.ll

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,19 @@ define void @test2(ptr %0, <2 x i64> %1, <2 x i64> %2) {
6060
ret void
6161
}
6262

63+
; Operand %4 is the higher-half of v2i64, and operand %2 is an input parameter of i64.
64+
; Test that %2 is duplicated into the proper lane of SIMD directly for optimal codegen.
65+
define void @test3(ptr %0, <2 x i64> %1, i64 %2) {
66+
; CHECK-LABEL: test3:
67+
; CHECK: // %bb.0:
68+
; CHECK-NEXT: dup v1.2d, x1
69+
; CHECK-NEXT: pmull2 v0.1q, v0.2d, v1.2d
70+
; CHECK-NEXT: str q0, [x0]
71+
; CHECK-NEXT: ret
72+
%4 = extractelement <2 x i64> %1, i64 1
73+
%5 = tail call <16 x i8> @llvm.aarch64.neon.pmull64(i64 %4, i64 %2)
74+
store <16 x i8> %5, ptr %0, align 16
75+
ret void
76+
}
77+
6378
declare <16 x i8> @llvm.aarch64.neon.pmull64(i64, i64)

llvm/test/CodeGen/AArch64/pmull-ldr-merge.ll

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,4 @@ define void @test3(ptr %0, i64 %1, i64 %2, i64 %3) {
6262
ret void
6363
}
6464

65-
; Operand %4 is the higher-half of v2i64, and operand %2 is an input parameter of i64.
66-
; Test that %2 is duplicated into the proper lane of SIMD directly for optimal codegen.
67-
define void @test4(ptr %0, <2 x i64> %1, i64 %2) {
68-
; CHECK-LABEL: test4:
69-
; CHECK: // %bb.0:
70-
; CHECK-NEXT: dup v1.2d, x1
71-
; CHECK-NEXT: pmull2 v0.1q, v0.2d, v1.2d
72-
; CHECK-NEXT: str q0, [x0]
73-
; CHECK-NEXT: ret
74-
%4 = extractelement <2 x i64> %1, i64 1
75-
%5 = tail call <16 x i8> @llvm.aarch64.neon.pmull64(i64 %4, i64 %2)
76-
store <16 x i8> %5, ptr %0, align 16
77-
ret void
78-
}
79-
8065
declare <16 x i8> @llvm.aarch64.neon.pmull64(i64, i64)

0 commit comments

Comments
 (0)