diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2008-03-19 23:38:52 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2008-03-19 23:38:52 +0000 |
| commit | bbba76fc99110339e356e11ae2b1f887406425be (patch) | |
| tree | 47750b525326b7fe5eaaa68f5255c57d6c877dca /llvm/test/CodeGen/X86/mmx-shift.ll | |
| parent | c5f8120ad028a62d3d21c209d9b8ee3729b41137 (diff) | |
| download | bcm5719-llvm-bbba76fc99110339e356e11ae2b1f887406425be.tar.gz bcm5719-llvm-bbba76fc99110339e356e11ae2b1f887406425be.zip | |
Add intrinsics to match mmx shift builtin's with immediate operand.
llvm-svn: 48569
Diffstat (limited to 'llvm/test/CodeGen/X86/mmx-shift.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/mmx-shift.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/mmx-shift.ll b/llvm/test/CodeGen/X86/mmx-shift.ll new file mode 100644 index 00000000000..1ebc0435c81 --- /dev/null +++ b/llvm/test/CodeGen/X86/mmx-shift.ll @@ -0,0 +1,20 @@ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx | grep psllq | grep 32 +; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx | grep psrad + +define i64 @t1(<1 x i64> %mm1) nounwind { +entry: + %tmp6 = tail call <1 x i64> @llvm.x86.mmx.pslli.q( <1 x i64> %mm1, i32 32 ) ; <<1 x i64>> [#uses=1] + %retval1112 = bitcast <1 x i64> %tmp6 to i64 ; <i64> [#uses=1] + ret i64 %retval1112 +} + +declare <1 x i64> @llvm.x86.mmx.pslli.q(<1 x i64>, i32) nounwind readnone + +define i64 @t2(<2 x i32> %mm1, <2 x i32> %mm2) nounwind { +entry: + %tmp7 = tail call <2 x i32> @llvm.x86.mmx.psra.d( <2 x i32> %mm1, <2 x i32> %mm2 ) nounwind readnone ; <<2 x i32>> [#uses=1] + %retval1112 = bitcast <2 x i32> %tmp7 to i64 ; <i64> [#uses=1] + ret i64 %retval1112 +} + +declare <2 x i32> @llvm.x86.mmx.psra.d(<2 x i32>, <2 x i32>) nounwind readnone |

