1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/test/Transforms/InstCombine/cast-and-cast.ll
Tanya Lattner 9aa573954c Remove llvm-upgrade and update tests.
llvm-svn: 48103
2008-03-09 08:16:40 +00:00

18 lines
572 B
LLVM

; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
; RUN: not grep bitcast
define i1 @test1(i32 %val) {
%t1 = bitcast i32 %val to i32 ; <i32> [#uses=1]
%t2 = and i32 %t1, 1 ; <i32> [#uses=1]
%t3 = trunc i32 %t2 to i1 ; <i1> [#uses=1]
ret i1 %t3
}
define i16 @test1.upgrd.1(i32 %val) {
%t1 = bitcast i32 %val to i32 ; <i32> [#uses=1]
%t2 = and i32 %t1, 1 ; <i32> [#uses=1]
%t3 = trunc i32 %t2 to i16 ; <i16> [#uses=1]
ret i16 %t3
}