blob: e7d8756791b6bb7adafd4924a8158cbd4fbc920b [file] [log] [blame]
Tanya Lattner3f7706b2004-11-07 06:08:43 +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 Spencer3da59db2006-11-27 01:05:10 +00005void "NewCasts" (short %x) {
6 %a = zext short %x to int
7 %b = sext short %x to uint
8 %c = trunc short %x to ubyte
9 %d = uitofp short %x to float
10 %e = sitofp short %x to double
11 %f = fptoui float %d to short
12 %g = fptosi double %e to short
13 %i = fpext float %d to double
14 %j = fptrunc double %i to float
15 %k = bitcast int %a to float
16 %l = inttoptr short %x to int*
17 %m = ptrtoint int* %l to long
18 ret void
19}
Chris Lattner09083092001-07-08 04:57:15 +000020
21short "FunFunc"(long %x, sbyte %z)
22begin
23bb0: ;;<label>
24 %cast110 = cast sbyte %z to short ;;<short>:(signed operands)
25 %cast10 = cast long %x to short ;;<short>
26 %reg109 = add short %cast110, %cast10 ;;<short>
27 ret short %reg109 ;;<void>
28end
29