1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 06:22:56 +02:00
llvm-mirror/test/Transforms/InstCombine/2006-09-15-CastToBool.ll
2007-01-17 07:59:14 +00:00

15 lines
602 B
LLVM

; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | grep and
; PR913
int %test(int* %tmp1) {
%tmp.i = load int* %tmp1 ; <int> [#uses=1]
%tmp = cast int %tmp.i to uint ; <uint> [#uses=1]
%tmp2.ui = shr uint %tmp, ubyte 5 ; <uint> [#uses=1]
%tmp2 = cast uint %tmp2.ui to int ; <int> [#uses=1]
%tmp3 = and int %tmp2, 1 ; <int> [#uses=1]
%tmp3 = cast int %tmp3 to bool ; <bool> [#uses=1]
%tmp34 = cast bool %tmp3 to int ; <int> [#uses=1]
ret int %tmp34
}