aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-11-16 06:37:56 +0000
committerCraig Topper <craig.topper@gmail.com>2012-11-16 06:37:56 +0000
commitd577552c668b744a995c41ff0b73c68eb30d7b93 (patch)
tree0cf1315ae24f7070c033e09ee13110782048d870 /test/CodeGen
parent06be8b8a698b3d71aa93f30456b197ca6d54b1d0 (diff)
Use roundps/pd for llvm.ceil, llvm.trunc, llvm.rint, and llvm.nearbyint of vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168141 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/vec_floor.ll144
1 files changed, 144 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_floor.ll b/test/CodeGen/X86/vec_floor.ll
index 5e0160bd28..4db68bd182 100644
--- a/test/CodeGen/X86/vec_floor.ll
+++ b/test/CodeGen/X86/vec_floor.ll
@@ -36,3 +36,147 @@ define <8 x float> @floor_v8f32(<8 x float> %p)
ret <8 x float> %t
}
declare <8 x float> @llvm.floor.v8f32(<8 x float> %p)
+
+define <2 x double> @ceil_v2f64(<2 x double> %p)
+{
+ ; CHECK: ceil_v2f64
+ ; CHECK: vroundpd
+ %t = call <2 x double> @llvm.ceil.v2f64(<2 x double> %p)
+ ret <2 x double> %t
+}
+declare <2 x double> @llvm.ceil.v2f64(<2 x double> %p)
+
+define <4 x float> @ceil_v4f32(<4 x float> %p)
+{
+ ; CHECK: ceil_v4f32
+ ; CHECK: vroundps
+ %t = call <4 x float> @llvm.ceil.v4f32(<4 x float> %p)
+ ret <4 x float> %t
+}
+declare <4 x float> @llvm.ceil.v4f32(<4 x float> %p)
+
+define <4 x double> @ceil_v4f64(<4 x double> %p)
+{
+ ; CHECK: ceil_v4f64
+ ; CHECK: vroundpd
+ %t = call <4 x double> @llvm.ceil.v4f64(<4 x double> %p)
+ ret <4 x double> %t
+}
+declare <4 x double> @llvm.ceil.v4f64(<4 x double> %p)
+
+define <8 x float> @ceil_v8f32(<8 x float> %p)
+{
+ ; CHECK: ceil_v8f32
+ ; CHECK: vroundps
+ %t = call <8 x float> @llvm.ceil.v8f32(<8 x float> %p)
+ ret <8 x float> %t
+}
+declare <8 x float> @llvm.ceil.v8f32(<8 x float> %p)
+
+define <2 x double> @trunc_v2f64(<2 x double> %p)
+{
+ ; CHECK: trunc_v2f64
+ ; CHECK: vroundpd
+ %t = call <2 x double> @llvm.trunc.v2f64(<2 x double> %p)
+ ret <2 x double> %t
+}
+declare <2 x double> @llvm.trunc.v2f64(<2 x double> %p)
+
+define <4 x float> @trunc_v4f32(<4 x float> %p)
+{
+ ; CHECK: trunc_v4f32
+ ; CHECK: vroundps
+ %t = call <4 x float> @llvm.trunc.v4f32(<4 x float> %p)
+ ret <4 x float> %t
+}
+declare <4 x float> @llvm.trunc.v4f32(<4 x float> %p)
+
+define <4 x double> @trunc_v4f64(<4 x double> %p)
+{
+ ; CHECK: trunc_v4f64
+ ; CHECK: vroundpd
+ %t = call <4 x double> @llvm.trunc.v4f64(<4 x double> %p)
+ ret <4 x double> %t
+}
+declare <4 x double> @llvm.trunc.v4f64(<4 x double> %p)
+
+define <8 x float> @trunc_v8f32(<8 x float> %p)
+{
+ ; CHECK: trunc_v8f32
+ ; CHECK: vroundps
+ %t = call <8 x float> @llvm.trunc.v8f32(<8 x float> %p)
+ ret <8 x float> %t
+}
+declare <8 x float> @llvm.trunc.v8f32(<8 x float> %p)
+
+define <2 x double> @rint_v2f64(<2 x double> %p)
+{
+ ; CHECK: rint_v2f64
+ ; CHECK: vroundpd
+ %t = call <2 x double> @llvm.rint.v2f64(<2 x double> %p)
+ ret <2 x double> %t
+}
+declare <2 x double> @llvm.rint.v2f64(<2 x double> %p)
+
+define <4 x float> @rint_v4f32(<4 x float> %p)
+{
+ ; CHECK: rint_v4f32
+ ; CHECK: vroundps
+ %t = call <4 x float> @llvm.rint.v4f32(<4 x float> %p)
+ ret <4 x float> %t
+}
+declare <4 x float> @llvm.rint.v4f32(<4 x float> %p)
+
+define <4 x double> @rint_v4f64(<4 x double> %p)
+{
+ ; CHECK: rint_v4f64
+ ; CHECK: vroundpd
+ %t = call <4 x double> @llvm.rint.v4f64(<4 x double> %p)
+ ret <4 x double> %t
+}
+declare <4 x double> @llvm.rint.v4f64(<4 x double> %p)
+
+define <8 x float> @rint_v8f32(<8 x float> %p)
+{
+ ; CHECK: rint_v8f32
+ ; CHECK: vroundps
+ %t = call <8 x float> @llvm.rint.v8f32(<8 x float> %p)
+ ret <8 x float> %t
+}
+declare <8 x float> @llvm.rint.v8f32(<8 x float> %p)
+
+define <2 x double> @nearbyint_v2f64(<2 x double> %p)
+{
+ ; CHECK: nearbyint_v2f64
+ ; CHECK: vroundpd
+ %t = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %p)
+ ret <2 x double> %t
+}
+declare <2 x double> @llvm.nearbyint.v2f64(<2 x double> %p)
+
+define <4 x float> @nearbyint_v4f32(<4 x float> %p)
+{
+ ; CHECK: nearbyint_v4f32
+ ; CHECK: vroundps
+ %t = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %p)
+ ret <4 x float> %t
+}
+declare <4 x float> @llvm.nearbyint.v4f32(<4 x float> %p)
+
+define <4 x double> @nearbyint_v4f64(<4 x double> %p)
+{
+ ; CHECK: nearbyint_v4f64
+ ; CHECK: vroundpd
+ %t = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %p)
+ ret <4 x double> %t
+}
+declare <4 x double> @llvm.nearbyint.v4f64(<4 x double> %p)
+
+define <8 x float> @nearbyint_v8f32(<8 x float> %p)
+{
+ ; CHECK: nearbyint_v8f32
+ ; CHECK: vroundps
+ %t = call <8 x float> @llvm.nearbyint.v8f32(<8 x float> %p)
+ ret <8 x float> %t
+}
+declare <8 x float> @llvm.nearbyint.v8f32(<8 x float> %p)