[PATCH] [AArch64] Fix a pattern match failure for movi with 1D result
Jiangning Liu
liujiangning1 at gmail.com
Fri Dec 6 05:06:36 PST 2013
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/c31e13bf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: movimm-1d-llvm.patch
Type: text/x-patch
Size: 1433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131206/c31e13bf/attachment.bin>
More information about the llvm-commits
mailing list