summaryrefslogtreecommitdiff
path: root/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-02 04:09:12 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-02 04:09:12 +0000
commitc3ff3f42ee9a9fb755b0eb0718a31d701b93b3e0 (patch)
tree6cf4216de4fa4a52e2158f227244497b9548a74b /test/CodeGen/SPARC
parenta10fd6d3d1027b3903d27af701f876e36c1725c0 (diff)
downloadllvm-c3ff3f42ee9a9fb755b0eb0718a31d701b93b3e0.tar.gz
llvm-c3ff3f42ee9a9fb755b0eb0718a31d701b93b3e0.tar.bz2
llvm-c3ff3f42ee9a9fb755b0eb0718a31d701b93b3e0.tar.xz
Add 64-bit shift instructions.
SPARC v9 defines new 64-bit shift instructions. The 32-bit shift right instructions are still usable as zero and sign extensions. This adds new F3_Sr and F3_Si instruction formats that probably should be used for the 32-bit shifts as well. They don't really encode an simm13 field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SPARC')
-rw-r--r--test/CodeGen/SPARC/64bit.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/64bit.ll b/test/CodeGen/SPARC/64bit.ll
index 1efbc15af6..6387e00427 100644
--- a/test/CodeGen/SPARC/64bit.ll
+++ b/test/CodeGen/SPARC/64bit.ll
@@ -5,3 +5,17 @@
define i64 @ret2(i64 %a, i64 %b) {
ret i64 %b
}
+
+; CHECK: shl_imm
+; CHECK: sllx %i0, 7, %i0
+define i64 @shl_imm(i64 %a) {
+ %x = shl i64 %a, 7
+ ret i64 %x
+}
+
+; CHECK: sra_reg
+; CHECK: srax %i0, %i1, %i0
+define i64 @sra_reg(i64 %a, i64 %b) {
+ %x = ashr i64 %a, %b
+ ret i64 %x
+}