1 ;RUN: llvm-upgrade < %s | llvm-as | opt -instcombine |llvm-dis |grep zext
3 ;Make sure the uint isn't removed.
4 ;instcombine in llvm 1.9 was dropping the uint cast which was causing a sign
6 ;this only affected code with pointers in the high half of memory, so it wasn't
8 ;compile a kernel though...
10 target datalayout = "e-p:32:32"
11 target endian = little
12 target pointersize = 32
14 %str = internal constant [6 x sbyte] c"%llx\0A\00"
16 implementation ; Functions:
18 declare int %printf(sbyte*, ...)
20 int %main(int %x, sbyte** %a) {
22 %tmp = getelementptr [6 x sbyte]* %str, int 0, uint 0
23 %tmp1 = load sbyte** %a
24 %tmp2 = cast sbyte* %tmp1 to uint ; <uint> [#uses=1]
25 %tmp3 = cast uint %tmp2 to long ; <long> [#uses=1]
26 %tmp = call int (sbyte*, ...)* %printf( sbyte* %tmp, long %tmp3 )