blob: 350a9849947789359582f8181d71a710717ff00d [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
5
Reid Spencere3ff5ad2007-01-26 08:25:06 +00006declare void @"foo"(i31 %i, i63 %j, i10 %k)
Reid Spencerc0948362007-01-16 18:08:22 +00007
Reid Spencerc0948362007-01-16 18:08:22 +00008
9; foo test basic arith operations
Reid Spencere3ff5ad2007-01-26 08:25:06 +000010define void @"foo"(i31 %i, i63 %j, i10 %k)
Reid Spencerc0948362007-01-16 18:08:22 +000011begin
12 %t1 = trunc i63 %j to i31
13 %t2 = add i31 %t1, %i
14 %t20 = add i31 3, %t1
15 %t3 = zext i31 %i to i63
16 %t4 = sub i63 %t3, %j
17 %t40 = sub i63 %j, -100
18 %t5 = mul i10 %k, 7
19 %t6 = sdiv i63 %j, -2
20 %t7 = udiv i63 %j, %t3
21 %t8 = urem i10 %k, 10
22 %t9 = srem i10 %k, -10
23 ret void
24end
25