diff options
author | Chad Rosier <mcrosier@apple.com> | 2011-10-25 01:22:20 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2011-10-25 01:22:20 +0000 |
commit | 17d47e423d93d0bbd50905d7045e43fd3c4a4a77 (patch) | |
tree | 93fa5a69b1dbd10210ff98fe6a244e03e49e7289 /test/Bitcode | |
parent | f2a783303e90a389ba7d40920039346e9f2d6777 (diff) |
Fix these test cases to not use .bc files. Otherwise, we run into issues with
bitcode reader/writer backward compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142896 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bitcode')
-rw-r--r-- | test/Bitcode/sse42_crc32.ll | 17 | ||||
-rw-r--r-- | test/Bitcode/sse42_crc32.ll.bc | bin | 480 -> 0 bytes | |||
-rw-r--r-- | test/Bitcode/ssse3_palignr.ll | 82 | ||||
-rw-r--r-- | test/Bitcode/ssse3_palignr.ll.bc | bin | 1504 -> 0 bytes |
4 files changed, 97 insertions, 2 deletions
diff --git a/test/Bitcode/sse42_crc32.ll b/test/Bitcode/sse42_crc32.ll index 1c371c3a23..3f27d85589 100644 --- a/test/Bitcode/sse42_crc32.ll +++ b/test/Bitcode/sse42_crc32.ll @@ -3,7 +3,7 @@ ; ; Rdar: 9472944 ; -; RUN: llvm-dis < %s.bc | FileCheck %s +; RUN: opt < %s | llvm-dis | FileCheck %s ; crc32.8 should upgrade to crc32.32.8 ; CHECK: i32 @llvm.x86.sse42.crc32.32.8( @@ -26,3 +26,18 @@ ; CHECK-NOT: i64 @llvm.x86.sse42.crc64.64( +define void @foo() nounwind readnone ssp { +entry: + %0 = call i32 @llvm.x86.sse42.crc32.8(i32 0, i8 0) + %1 = call i32 @llvm.x86.sse42.crc32.16(i32 0, i16 0) + %2 = call i32 @llvm.x86.sse42.crc32.32(i32 0, i32 0) + %3 = call i64 @llvm.x86.sse42.crc64.8(i64 0, i8 0) + %4 = call i64 @llvm.x86.sse42.crc64.64(i64 0, i64 0) + ret void +} + +declare i32 @llvm.x86.sse42.crc32.8(i32, i8) nounwind readnone +declare i32 @llvm.x86.sse42.crc32.16(i32, i16) nounwind readnone +declare i32 @llvm.x86.sse42.crc32.32(i32, i32) nounwind readnone +declare i64 @llvm.x86.sse42.crc64.8(i64, i8) nounwind readnone +declare i64 @llvm.x86.sse42.crc64.64(i64, i64) nounwind readnone diff --git a/test/Bitcode/sse42_crc32.ll.bc b/test/Bitcode/sse42_crc32.ll.bc Binary files differdeleted file mode 100644 index d895fad2ac..0000000000 --- a/test/Bitcode/sse42_crc32.ll.bc +++ /dev/null diff --git a/test/Bitcode/ssse3_palignr.ll b/test/Bitcode/ssse3_palignr.ll index f62ca118c1..eb844497d9 100644 --- a/test/Bitcode/ssse3_palignr.ll +++ b/test/Bitcode/ssse3_palignr.ll @@ -1,2 +1,82 @@ -; RUN: llvm-dis < %s.bc | FileCheck %s +; RUN: opt < %s | llvm-dis | FileCheck %s ; CHECK-NOT: {@llvm\\.palign} + +define <4 x i32> @align1(<4 x i32> %a, <4 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <4 x i32> %b to <2 x i64> ; <<2 x i64>> [#uses=1] + %1 = bitcast <4 x i32> %a to <2 x i64> ; <<2 x i64>> [#uses=1] + %2 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %1, <2 x i64> %0, i8 15) ; <<2 x i64>> [#uses=1] + %3 = bitcast <2 x i64> %2 to <4 x i32> ; <<4 x i32>> [#uses=1] + ret <4 x i32> %3 +} + +define double @align8(<2 x i32> %a, <2 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <2 x i32> %b to <1 x i64> ; <<1 x i64>> [#uses=1] + %1 = bitcast <2 x i32> %a to <1 x i64> ; <<1 x i64>> [#uses=1] + %2 = tail call <1 x i64> @llvm.x86.ssse3.palign.r(<1 x i64> %1, <1 x i64> %0, i8 7) ; <<1 x i64>> [#uses=1] + %3 = extractelement <1 x i64> %2, i32 0 ; <i64> [#uses=1] + %retval12 = bitcast i64 %3 to double ; <double> [#uses=1] + ret double %retval12 +} + +declare <1 x i64> @llvm.x86.ssse3.palign.r(<1 x i64>, <1 x i64>, i8) nounwind readnone + +define double @align7(<2 x i32> %a, <2 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <2 x i32> %b to <1 x i64> ; <<1 x i64>> [#uses=1] + %1 = bitcast <2 x i32> %a to <1 x i64> ; <<1 x i64>> [#uses=1] + %2 = tail call <1 x i64> @llvm.x86.ssse3.palign.r(<1 x i64> %1, <1 x i64> %0, i8 16) ; <<1 x i64>> [#uses=1] + %3 = extractelement <1 x i64> %2, i32 0 ; <i64> [#uses=1] + %retval12 = bitcast i64 %3 to double ; <double> [#uses=1] + ret double %retval12 +} + +define double @align6(<2 x i32> %a, <2 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <2 x i32> %b to <1 x i64> ; <<1 x i64>> [#uses=1] + %1 = bitcast <2 x i32> %a to <1 x i64> ; <<1 x i64>> [#uses=1] + %2 = tail call <1 x i64> @llvm.x86.ssse3.palign.r(<1 x i64> %1, <1 x i64> %0, i8 9) ; <<1 x i64>> [#uses=1] + %3 = extractelement <1 x i64> %2, i32 0 ; <i64> [#uses=1] + %retval12 = bitcast i64 %3 to double ; <double> [#uses=1] + ret double %retval12 +} + +define double @align5(<2 x i32> %a, <2 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <2 x i32> %b to <1 x i64> ; <<1 x i64>> [#uses=1] + %1 = bitcast <2 x i32> %a to <1 x i64> ; <<1 x i64>> [#uses=1] + %2 = tail call <1 x i64> @llvm.x86.ssse3.palign.r(<1 x i64> %1, <1 x i64> %0, i8 8) ; <<1 x i64>> [#uses=1] + %3 = extractelement <1 x i64> %2, i32 0 ; <i64> [#uses=1] + %retval12 = bitcast i64 %3 to double ; <double> [#uses=1] + ret double %retval12 +} + +define <4 x i32> @align4(<4 x i32> %a, <4 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <4 x i32> %b to <2 x i64> ; <<2 x i64>> [#uses=1] + %1 = bitcast <4 x i32> %a to <2 x i64> ; <<2 x i64>> [#uses=1] + %2 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %1, <2 x i64> %0, i8 32) ; <<2 x i64>> [#uses=1] + %3 = bitcast <2 x i64> %2 to <4 x i32> ; <<4 x i32>> [#uses=1] + ret <4 x i32> %3 +} + +declare <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64>, <2 x i64>, i8) nounwind readnone + +define <4 x i32> @align3(<4 x i32> %a, <4 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <4 x i32> %b to <2 x i64> ; <<2 x i64>> [#uses=1] + %1 = bitcast <4 x i32> %a to <2 x i64> ; <<2 x i64>> [#uses=1] + %2 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %1, <2 x i64> %0, i8 17) ; <<2 x i64>> [#uses=1] + %3 = bitcast <2 x i64> %2 to <4 x i32> ; <<4 x i32>> [#uses=1] + ret <4 x i32> %3 +} + +define <4 x i32> @align2(<4 x i32> %a, <4 x i32> %b) nounwind readnone ssp { +entry: + %0 = bitcast <4 x i32> %b to <2 x i64> ; <<2 x i64>> [#uses=1] + %1 = bitcast <4 x i32> %a to <2 x i64> ; <<2 x i64>> [#uses=1] + %2 = tail call <2 x i64> @llvm.x86.ssse3.palign.r.128(<2 x i64> %1, <2 x i64> %0, i8 16) ; <<2 x i64>> [#uses=1] + %3 = bitcast <2 x i64> %2 to <4 x i32> ; <<4 x i32>> [#uses=1] + ret <4 x i32> %3 +} diff --git a/test/Bitcode/ssse3_palignr.ll.bc b/test/Bitcode/ssse3_palignr.ll.bc Binary files differdeleted file mode 100644 index 3fc9cdf15a..0000000000 --- a/test/Bitcode/ssse3_palignr.ll.bc +++ /dev/null |