summaryrefslogtreecommitdiff
path: root/test/CodeGen/Generic/i128-arith.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-13 23:59:21 +0000
committerChris Lattner <sabre@nondot.org>2007-02-13 23:59:21 +0000
commitb42b411f74561ddcf705c6e4c5c91069b955b2cc (patch)
tree3d628256b63aa64123f8612978cce3ce346673a8 /test/CodeGen/Generic/i128-arith.ll
parentc38fea8ef489bb5879793e058108757ef5fdf782 (diff)
downloadllvm-b42b411f74561ddcf705c6e4c5c91069b955b2cc.tar.gz
llvm-b42b411f74561ddcf705c6e4c5c91069b955b2cc.tar.bz2
llvm-b42b411f74561ddcf705c6e4c5c91069b955b2cc.tar.xz
sanity check for *basic* i128 arithmetic on all hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Generic/i128-arith.ll')
-rw-r--r--test/CodeGen/Generic/i128-arith.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/i128-arith.ll b/test/CodeGen/Generic/i128-arith.ll
new file mode 100644
index 0000000000..9a670847b5
--- /dev/null
+++ b/test/CodeGen/Generic/i128-arith.ll
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | llc
+
+define i64 @foo(i64 %x, i64 %y, i32 %amt) {
+ %tmp0 = zext i64 %x to i128
+ %tmp1 = sext i64 %y to i128
+ %tmp2 = or i128 %tmp0, %tmp1
+ %tmp7 = zext i32 13 to i128
+ %tmp3 = lshr i128 %tmp2, %tmp7
+ %tmp4 = trunc i128 %tmp3 to i64
+ ret i64 %tmp4
+}