1 ; This test contains two cast instructions that cannot be eliminated. If the
2 ; input of the "test" function is negative, it should be correctly converted
3 ; to a 32 bit version of the number with all upper 16 bits clear (ushort->uint
4 ; involves no sign extension). Optimizing this to a single cast is invalid!
6 ; RUN: llvm-as < %s | opt -raise -q | lli
10 uint "test"(short %argc)
12 %cast223 = cast short %argc to ushort ; <ushort> [#uses=1]
13 %cast114 = cast ushort %cast223 to uint ; <uint> [#uses=1]
19 %Ret = call uint %test(short -1)
20 %test = cast uint %Ret to int
21 %Res = seteq int %test, -1 ; If it returns -1 as int, it's a failure
22 %Res = cast bool %Res to int