un-xfail this.
[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 | llvm-dis | notcast
3
4 target pointersize = 32
5
6 implementation
7
8 sbyte* %test1(sbyte* %t) {
9         %tmpc = cast sbyte* %t to uint
10         %tmpa = add uint %tmpc, 32
11         %tv = cast uint %tmpa to sbyte*
12         ret sbyte* %tv
13 }
14
15 bool %test2(sbyte* %a, sbyte* %b) {
16 %tmpa = cast sbyte* %a to uint
17 %tmpb = cast sbyte* %b to uint
18 %r = seteq uint %tmpa, %tmpb
19 ret bool %r
20 }