blob: 2e0ec1898228f974c295560d5460f94f634d2b0a [file] [log] [blame]
Reid Spencerc0948362007-01-16 18:08:22 +00001; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
5implementation
6
Reid Spencere3ff5ad2007-01-26 08:25:06 +00007define i31 @"simpleArith"(i31 %i0, i31 %j0)
Reid Spencerc0948362007-01-16 18:08:22 +00008begin
9 %t1 = add i31 %i0, %j0
10 %t2 = sub i31 %i0, %j0
11 %t3 = mul i31 %t1, %t2
12 %t4 = udiv i31 %t1, %t2
13 %t5 = sdiv i31 %t1, %t2
14 %t6 = urem i31 %t1, %t2
15 %t7 = srem i31 %t1, %t2
Zhou Sheng4da64202007-01-19 14:26:57 +000016 %t8 = shl i31 %t1, i8 9
17 %t9 = lshr i31 %t1, i8 9
18 %t10= ashr i31 %t1, i8 9
Reid Spencerc0948362007-01-16 18:08:22 +000019 %f1 = sitofp i31 %t1 to float
20 %f2 = fdiv float 4.0, %f1
21 ret i31 %t3
22end