[PATCH] [AArch64] Fix a pattern match failure for movi with 1D result
Ana Pazos
apazos at codeaurora.org
Fri Dec 6 19:33:01 PST 2013
Hi Jiangning,
I suggest we do these changes to the test case:
- Put the intrinsic test you created into the existing
/test/CodeGen/AArch64/neon-aba-abd.ll instead of creating a new file.
That is where the sabd tests are.
- Add a couple of test cases into test/CodeGen/AArch64/neon-mov.ll to cover
movi 1D scenario without using the intrinsic as well.
If you want I can do the changes and check in for you, if you are OOO.
Thanks,
Ana.
Examples:
+define <2 x i32> @movi1d_1() {
+; CHECK: movi d0, #0xffffffff0000
+ ret <2 x i32> < i32 -65536, i32 65535>
+}
+
+
+declare <2 x i32> @test_movi1d(<2 x i32>, <2 x i32>)
+define <2 x i32> @movi1d() {
+; CHECK: movi d1, #0xffffffff0000
+ %1 = tail call <2 x i32> @test_movi1d(<2 x i32> <i32 -2147483648, i32
2147450880>, <2 x i32> <i32 -65536, i32 65535>)
+ ret <2 x i32> %1
+}
Thanks,
Ana.
From: llvm-commits-bounces at cs.uiuc.edu
[mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Jiangning Liu
Sent: Friday, December 06, 2013 5:07 AM
To: llvm-commits at cs.uiuc.edu for LLVM
Subject: [PATCH] [AArch64] Fix a pattern match failure for movi with 1D
result
Hi,
Attached patch is to fix a pattern match failure for neon movi with scalar
1D result.
diff --git a/lib/Target/AArch64/AArch64InstrNEON.td
b/lib/Target/AArch64/AArch64InstrNEON.td
old mode 100644
new mode 100755
index eb62c13..7a63935
--- a/lib/Target/AArch64/AArch64InstrNEON.td
+++ b/lib/Target/AArch64/AArch64InstrNEON.td
@@ -1423,9 +1423,8 @@ let isReMaterializable = 1 in {
def MOVIdi : NeonI_1VModImm<0b0, 0b1,
(outs FPR64:$Rd), (ins neon_uimm64_mask:$Imm),
"movi\t $Rd, $Imm",
- [(set (f64 FPR64:$Rd),
- (f64 (bitconvert
- (v1i64 (Neon_movi (timm:$Imm), (i32
imm))))))],
+ [(set (v1i64 FPR64:$Rd),
+ (v1i64 (Neon_movi (timm:$Imm), (i32 imm))))],
NoItinerary> {
let cmode = 0b1110;
}
diff --git a/test/CodeGen/AArch64/neon-movi.ll
b/test/CodeGen/AArch64/neon-movi.ll
new file mode 100644
index 0000000..680ec47
--- /dev/null
+++ b/test/CodeGen/AArch64/neon-movi.ll
@@ -0,0 +1,8 @@
+; RUN: llc < %s -O2 -verify-machineinstrs -mtriple=aarch64-none-linux-gnu
-mattr=+neon | FileCheck %s
+
+declare <2 x i32> @llvm.arm.neon.vabds.v2i32(<2 x i32>, <2 x i32>)
+define <2 x i32> @test_movi_1d() {
+; CHECK: movi d1, #0xffffffff0000
+ %1 = tail call <2 x i32> @llvm.arm.neon.vabds.v2i32(<2 x i32> <i32
-2147483648, i32 2147450880>, <2 x i32> <i32 -65536, i32 65535>)
+ ret <2 x i32> %1
+}
--
Thanks,
-Jiangning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131206/fe74f686/attachment.html>
More information about the llvm-commits
mailing list