summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-11-15 02:12:34 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-11-15 02:12:34 +0000
commiteaa192af18677c4dc5894e049514d8a6b1d6d7c2 (patch)
treedc9dd55a7dd8a5f11f9e547107584e4fa1c408ca /test/CodeGen
parentbfc9429c2b814469adf3930dda31539d1c3319d8 (diff)
downloadllvm-eaa192af18677c4dc5894e049514d8a6b1d6d7c2.tar.gz
llvm-eaa192af18677c4dc5894e049514d8a6b1d6d7c2.tar.bz2
llvm-eaa192af18677c4dc5894e049514d8a6b1d6d7c2.tar.xz
Add vmov.f32 to materialize f32 immediate splats which cannot be handled by
integer variants. rdar://10437054 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144608 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/ARM/vmov.ll18
-rw-r--r--test/CodeGen/Thumb2/machine-licm.ll5
2 files changed, 20 insertions, 3 deletions
diff --git a/test/CodeGen/ARM/vmov.ll b/test/CodeGen/ARM/vmov.ll
index ab56e5bb29..0396a41a35 100644
--- a/test/CodeGen/ARM/vmov.ll
+++ b/test/CodeGen/ARM/vmov.ll
@@ -353,3 +353,21 @@ define void @noTruncStore(<4 x i32>* %a, <4 x i16>* %b) nounwind {
store <4 x i16> %tmp2, <4 x i16>* %b, align 8
ret void
}
+
+; Use vmov.f32 to materialize f32 immediate splats
+; rdar://10437054
+define void @v_mov_v2f32(<2 x float>* nocapture %p) nounwind {
+entry:
+;CHECK: v_mov_v2f32:
+;CHECK: vmov.f32 d{{.*}}, #-1.600000e+01
+ store <2 x float> <float -1.600000e+01, float -1.600000e+01>, <2 x float>* %p, align 4
+ ret void
+}
+
+define void @v_mov_v4f32(<4 x float>* nocapture %p) nounwind {
+entry:
+;CHECK: v_mov_v4f32:
+;CHECK: vmov.f32 q{{.*}}, #3.100000e+01
+ store <4 x float> <float 3.100000e+01, float 3.100000e+01, float 3.100000e+01, float 3.100000e+01>, <4 x float>* %p, align 4
+ ret void
+}
diff --git a/test/CodeGen/Thumb2/machine-licm.ll b/test/CodeGen/Thumb2/machine-licm.ll
index 46937fc84b..4e16c9aa3b 100644
--- a/test/CodeGen/Thumb2/machine-licm.ll
+++ b/test/CodeGen/Thumb2/machine-licm.ll
@@ -51,12 +51,11 @@ return: ; preds = %bb, %entry
define void @t2(i8* %ptr1, i8* %ptr2) nounwind {
entry:
; CHECK: t2:
-; CHECK: mov.w [[R3:r[0-9]+]], #1065353216
-; CHECK: vdup.32 q{{.*}}, [[R3]]
+; CHECK: vmov.f32 q{{.*}}, #1.000000e+00
br i1 undef, label %bb1, label %bb2
bb1:
-; CHECK-NEXT: %bb1
+; CHECK: %bb1
%indvar = phi i32 [ %indvar.next, %bb1 ], [ 0, %entry ]
%tmp1 = shl i32 %indvar, 2
%gep1 = getelementptr i8* %ptr1, i32 %tmp1