diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2011-09-30 03:18:46 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2011-09-30 03:18:46 +0000 |
commit | 61e256aa69c90685bdf78b01c4fd5202178e6c7a (patch) | |
tree | bc60e6fc1b286507a6facd2f5a6cdfd1a85cdda4 /llvm/test/CodeGen/Mips/mips64shift.ll | |
parent | 819b0d861919c8fb0a48d439f272a82012e1c7b8 (diff) | |
download | bcm5719-llvm-61e256aa69c90685bdf78b01c4fd5202178e6c7a.tar.gz bcm5719-llvm-61e256aa69c90685bdf78b01c4fd5202178e6c7a.zip |
Mips64 shift instructions.
llvm-svn: 140841
Diffstat (limited to 'llvm/test/CodeGen/Mips/mips64shift.ll')
-rw-r--r-- | llvm/test/CodeGen/Mips/mips64shift.ll | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/mips64shift.ll b/llvm/test/CodeGen/Mips/mips64shift.ll new file mode 100644 index 00000000000..31e56c82a7c --- /dev/null +++ b/llvm/test/CodeGen/Mips/mips64shift.ll @@ -0,0 +1,64 @@ +; RUN: llc -march=mips64el -mcpu=mips64r1 < %s | FileCheck %s + +define i64 @f0(i64 %a0, i64 %a1) nounwind readnone { +entry: +; CHECK: dsllv + %shl = shl i64 %a0, %a1 + ret i64 %shl +} + +define i64 @f1(i64 %a0, i64 %a1) nounwind readnone { +entry: +; CHECK: dsrav + %shr = ashr i64 %a0, %a1 + ret i64 %shr +} + +define i64 @f2(i64 %a0, i64 %a1) nounwind readnone { +entry: +; CHECK: dsrlv + %shr = lshr i64 %a0, %a1 + ret i64 %shr +} + +define i64 @f3(i64 %a0) nounwind readnone { +entry: +; CHECK: dsll + %shl = shl i64 %a0, 10 + ret i64 %shl +} + +define i64 @f4(i64 %a0) nounwind readnone { +entry: +; CHECK: dsra + %shr = ashr i64 %a0, 10 + ret i64 %shr +} + +define i64 @f5(i64 %a0) nounwind readnone { +entry: +; CHECK: dsrl + %shr = lshr i64 %a0, 10 + ret i64 %shr +} + +define i64 @f6(i64 %a0) nounwind readnone { +entry: +; CHECK: dsll32 + %shl = shl i64 %a0, 40 + ret i64 %shl +} + +define i64 @f7(i64 %a0) nounwind readnone { +entry: +; CHECK: dsra32 + %shr = ashr i64 %a0, 40 + ret i64 %shr +} + +define i64 @f8(i64 %a0) nounwind readnone { +entry: +; CHECK: dsrl32 + %shr = lshr i64 %a0, 40 + ret i64 %shr +} |