blob: 5bb8875961d55c34d6f3f88fa4119a5089961267 [file] [log] [blame]
Duncan Sands404eb052008-01-06 18:27:01 +00001; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep bitcast | count 2
2
3define void @a() {
4 ret void
5}
6
7define i32 @b(i32* inreg %x) signext {
8 ret i32 0
9}
10
11define void @c(...) {
12 ret void
13}
14
15define void @g(i32* %y) {
16 call void bitcast (void ()* @a to void (i32*)*)( i32* noalias %y )
17 call <2 x i32> bitcast (i32 (i32*)* @b to <2 x i32> (i32*)*)( i32* inreg null ) ; <<2 x i32>>:1 [#uses=0]
18 %x = call i64 bitcast (i32 (i32*)* @b to i64 (i32)*)( i32 0 ) ; <i64> [#uses=0]
19 call void bitcast (void (...)* @c to void (i32)*)( i32 0 )
20 call i32 bitcast (i32 (i32*)* @b to i32 (i32)*)( i32 zeroext 0 ) ; <i32>:2 [#uses=0]
21 call void bitcast (void (...)* @c to void (i32)*)( i32 zeroext 0 )
22 ret void
23}