diff options
author | Tanya Lattner <tonic@nondot.org> | 2008-02-21 07:42:26 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2008-02-21 07:42:26 +0000 |
commit | 33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e (patch) | |
tree | c8a69f1be3db80d136ec9dcc8e41d9d5affd35ad /test/CodeGen/X86/vec_ss_load_fold.ll | |
parent | 7c1687c196e8dc89a4722e0463965f0b0f5f399c (diff) | |
download | external_llvm-33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e.zip external_llvm-33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e.tar.gz external_llvm-33eefffb2b25b5f4a313f08fa7c57ddfcbccf36e.tar.bz2 |
Remove llvm-upgrade and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47432 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_ss_load_fold.ll')
-rw-r--r-- | test/CodeGen/X86/vec_ss_load_fold.ll | 62 |
1 files changed, 28 insertions, 34 deletions
diff --git a/test/CodeGen/X86/vec_ss_load_fold.ll b/test/CodeGen/X86/vec_ss_load_fold.ll index 1ea87c1..c123765 100644 --- a/test/CodeGen/X86/vec_ss_load_fold.ll +++ b/test/CodeGen/X86/vec_ss_load_fold.ll @@ -1,47 +1,41 @@ -; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse,+sse2 -o %t -f +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse,+sse2 -o %t -f ; RUN: grep minss %t | grep CPI | count 2 ; RUN: grep CPI %t | not grep movss -target endian = little -target pointersize = 32 +target datalayout = "e-p:32:32" target triple = "i686-apple-darwin8.7.2" -implementation ; Functions: - -ushort %test1(float %f) { - %tmp = insertelement <4 x float> undef, float %f, uint 0 ; <<4 x float>> [#uses=1] - %tmp10 = insertelement <4 x float> %tmp, float 0.000000e+00, uint 1 ; <<4 x float>> [#uses=1] - %tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, uint 2 ; <<4 x float>> [#uses=1] - %tmp12 = insertelement <4 x float> %tmp11, float 0.000000e+00, uint 3 ; <<4 x float>> [#uses=1] - %tmp28 = tail call <4 x float> %llvm.x86.sse.sub.ss( <4 x float> %tmp12, <4 x float> < float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1] - %tmp37 = tail call <4 x float> %llvm.x86.sse.mul.ss( <4 x float> %tmp28, <4 x float> < float 5.000000e-01, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1] - %tmp48 = tail call <4 x float> %llvm.x86.sse.min.ss( <4 x float> %tmp37, <4 x float> < float 6.553500e+04, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1] - %tmp59 = tail call <4 x float> %llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> zeroinitializer ) ; <<4 x float>> [#uses=1] - %tmp = tail call int %llvm.x86.sse.cvttss2si( <4 x float> %tmp59 ) ; <int> [#uses=1] - %tmp69 = cast int %tmp to ushort ; <ushort> [#uses=1] - ret ushort %tmp69 +define i16 @test1(float %f) { + %tmp = insertelement <4 x float> undef, float %f, i32 0 ; <<4 x float>> [#uses=1] + %tmp10 = insertelement <4 x float> %tmp, float 0.000000e+00, i32 1 ; <<4 x float>> [#uses=1] + %tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, i32 2 ; <<4 x float>> [#uses=1] + %tmp12 = insertelement <4 x float> %tmp11, float 0.000000e+00, i32 3 ; <<4 x float>> [#uses=1] + %tmp28 = tail call <4 x float> @llvm.x86.sse.sub.ss( <4 x float> %tmp12, <4 x float> < float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1] + %tmp37 = tail call <4 x float> @llvm.x86.sse.mul.ss( <4 x float> %tmp28, <4 x float> < float 5.000000e-01, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1] + %tmp48 = tail call <4 x float> @llvm.x86.sse.min.ss( <4 x float> %tmp37, <4 x float> < float 6.553500e+04, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1] + %tmp59 = tail call <4 x float> @llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> zeroinitializer ) ; <<4 x float>> [#uses=1] + %tmp.upgrd.1 = tail call i32 @llvm.x86.sse.cvttss2si( <4 x float> %tmp59 ) ; <i32> [#uses=1] + %tmp69 = trunc i32 %tmp.upgrd.1 to i16 ; <i16> [#uses=1] + ret i16 %tmp69 } -ushort %test2(float %f) { - %tmp28 = sub float %f, 1.000000e+00 ; <float> [#uses=1] - %tmp37 = mul float %tmp28, 5.000000e-01 ; <float> [#uses=1] - %tmp375 = insertelement <4 x float> undef, float %tmp37, uint 0 ; <<4 x float>> [#uses=1] - %tmp48 = tail call <4 x float> %llvm.x86.sse.min.ss( <4 x float> %tmp375, <4 x float> < float 6.553500e+04, float undef, float undef, float undef > ) ; <<4 x float>> [#uses=1] - %tmp59 = tail call <4 x float> %llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> < float 0.000000e+00, float undef, float undef, float undef > ) ; <<4 x float>> [#uses=1] - %tmp = tail call int %llvm.x86.sse.cvttss2si( <4 x float> %tmp59 ) ; <int> [#uses=1] - %tmp69 = cast int %tmp to ushort ; <ushort> [#uses=1] - ret ushort %tmp69 +define i16 @test2(float %f) { + %tmp28 = sub float %f, 1.000000e+00 ; <float> [#uses=1] + %tmp37 = mul float %tmp28, 5.000000e-01 ; <float> [#uses=1] + %tmp375 = insertelement <4 x float> undef, float %tmp37, i32 0 ; <<4 x float>> [#uses=1] + %tmp48 = tail call <4 x float> @llvm.x86.sse.min.ss( <4 x float> %tmp375, <4 x float> < float 6.553500e+04, float undef, float undef, float undef > ) ; <<4 x float>> [#uses=1] + %tmp59 = tail call <4 x float> @llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> < float 0.000000e+00, float undef, float undef, float undef > ) ; <<4 x float>> [#uses=1] + %tmp = tail call i32 @llvm.x86.sse.cvttss2si( <4 x float> %tmp59 ) ; <i32> [#uses=1] + %tmp69 = trunc i32 %tmp to i16 ; <i16> [#uses=1] + ret i16 %tmp69 } +declare <4 x float> @llvm.x86.sse.sub.ss(<4 x float>, <4 x float>) -declare <4 x float> %llvm.x86.sse.sub.ss(<4 x float>, <4 x float>) +declare <4 x float> @llvm.x86.sse.mul.ss(<4 x float>, <4 x float>) -declare <4 x float> %llvm.x86.sse.mul.ss(<4 x float>, <4 x float>) - -declare <4 x float> %llvm.x86.sse.min.ss(<4 x float>, <4 x float>) - -declare <4 x float> %llvm.x86.sse.max.ss(<4 x float>, <4 x float>) - -declare int %llvm.x86.sse.cvttss2si(<4 x float>) +declare <4 x float> @llvm.x86.sse.min.ss(<4 x float>, <4 x float>) +declare <4 x float> @llvm.x86.sse.max.ss(<4 x float>, <4 x float>) +declare i32 @llvm.x86.sse.cvttss2si(<4 x float>) |