Chris Lattner | 41765fd | 2002-11-13 06:54:00 +0000 | [diff] [blame^] | 1 | ; This testcase should be able to eliminate at least one of the casts. |
2 | ; | ||||
3 | ; RUN: if as < %s | opt -raise | dis | grep 'REMOVE' | ||||
4 | ; RUN: then exit 1 | ||||
5 | ; RUN: else exit 0 | ||||
6 | ; RUN: fi | ||||
7 | |||||
8 | int %foo(sbyte * %PF) { | ||||
9 | %UPF = cast sbyte* %PF to uint()* | ||||
10 | %Ret = call uint %UPF() | ||||
11 | %REMOVE = cast uint %Ret to int | ||||
12 | ret int %REMOVE | ||||
13 | } |