[PATCH] D15322: Define selection for v4f16, v8f16 scalar_to_vector

Pirama Arumuga Nainar via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 15:10:10 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL255072: Define selection for v4f16, v8f16 scalar_to_vector (authored by pirama).

Changed prior to commit:
  http://reviews.llvm.org/D15322?vs=42135&id=42237#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D15322

Files:
  llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/trunk/test/CodeGen/AArch64/fp16-v4-instructions.ll
  llvm/trunk/test/CodeGen/AArch64/fp16-v8-instructions.ll

Index: llvm/trunk/test/CodeGen/AArch64/fp16-v8-instructions.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/fp16-v8-instructions.ll
+++ llvm/trunk/test/CodeGen/AArch64/fp16-v8-instructions.ll
@@ -358,4 +358,13 @@
   ret <8 x half> %1
 }
 
+define void @test_insert_at_zero(half %a, <8 x half>* %b) #0 {
+; CHECK-LABEL: test_insert_at_zero:
+; CHECK-NEXT: str q0, [x0]
+; CHECK-NEXT: ret
+  %1 = insertelement <8 x half> undef, half %a, i64 0
+  store <8 x half> %1, <8 x half>* %b, align 4
+  ret void
+}
+
 attributes #0 = { nounwind }
Index: llvm/trunk/test/CodeGen/AArch64/fp16-v4-instructions.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/fp16-v4-instructions.ll
+++ llvm/trunk/test/CodeGen/AArch64/fp16-v4-instructions.ll
@@ -218,4 +218,13 @@
   ret <4 x half> %1
 }
 
+define void @test_insert_at_zero(half %a, <4 x half>* %b) #0 {
+; CHECK-LABEL: test_insert_at_zero:
+; CHECK-NEXT: str d0, [x0]
+; CHECK-NEXT: ret
+  %1 = insertelement <4 x half> undef, half %a, i64 0
+  store <4 x half> %1, <4 x half>* %b, align 4
+  ret void
+}
+
 attributes #0 = { nounwind }
Index: llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
===================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
+++ llvm/trunk/lib/Target/AArch64/AArch64InstrInfo.td
@@ -3843,6 +3843,11 @@
             (v2i64 (INSERT_SUBREG (v2i64 (IMPLICIT_DEF)),
                                   (i64 FPR64:$Rn), dsub))>;
 
+def : Pat<(v4f16 (scalar_to_vector (f16 FPR16:$Rn))),
+          (INSERT_SUBREG (v4f16 (IMPLICIT_DEF)), FPR16:$Rn, hsub)>;
+def : Pat<(v8f16 (scalar_to_vector (f16 FPR16:$Rn))),
+          (INSERT_SUBREG (v8f16 (IMPLICIT_DEF)), FPR16:$Rn, hsub)>;
+
 def : Pat<(v4f32 (scalar_to_vector (f32 FPR32:$Rn))),
           (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)), FPR32:$Rn, ssub)>;
 def : Pat<(v2f32 (scalar_to_vector (f32 FPR32:$Rn))),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15322.42237.patch
Type: text/x-patch
Size: 1999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151208/79d2ba5c/attachment.bin>


More information about the llvm-commits mailing list