fix this testcase
[oota-llvm.git] / test / Transforms / InstCombine / cast_ptr.ll
1 ; Tests to make sure elimination of casts is working correctly
2 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
3 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | notcast
4 ; XFAIL: *
5
6 target pointersize = 32
7
8 implementation
9
10 sbyte* %test1(sbyte* %t) {
11         %tmpc = cast sbyte* %t to uint
12         %tmpa = add uint %tmpc, 32
13         %tv = cast uint %tmpa to sbyte*
14         ret sbyte* %tv
15 }
16
17 bool %test2(sbyte* %a, sbyte* %b) {
18 %tmpa = cast sbyte* %a to uint
19 %tmpb = cast sbyte* %b to uint
20 %r = seteq uint %tmpa, %tmpb
21 ret bool %r
22 }