blob: e2eee4f7f12e511194104979798dc562639c9835 [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
Reid Spencere3ff5ad2007-01-26 08:25:06 +00005define void @"NewCasts" (i17 %x) {
Reid Spencerc0948362007-01-16 18:08:22 +00006 %a = zext i17 %x to i32
7 %b = sext i17 %x to i32
8 %c = trunc i17 %x to i8
9 %d = uitofp i17 %x to float
10 %e = sitofp i17 %x to double
11 %f = fptoui float %d to i17
12 %g = fptosi double %e to i17
13 %i = fpext float %d to double
14 %j = fptrunc double %i to float
15 %k = bitcast i32 %a to float
16 %l = inttoptr i17 %x to i32*
17 %m = ptrtoint i32* %l to i64
18 ret void
19}
20
21
Reid Spencere3ff5ad2007-01-26 08:25:06 +000022define i17 @"ZExtConst" () {
Reid Spencerc0948362007-01-16 18:08:22 +000023 ret i17 trunc ( i32 zext ( i17 42 to i32) to i17 )
24}
25
Reid Spencere3ff5ad2007-01-26 08:25:06 +000026define i17 @"SExtConst" () {
Reid Spencerc0948362007-01-16 18:08:22 +000027 ret i17 trunc (i32 sext (i17 42 to i32) to i17 )
28}