1 ; RUN: opt < %s -instcombine -S | FileCheck %s 2 3 target datalayout = "e-p:32:32" 4 target triple = "i686-pc-linux-gnu" 5 6 define i32 @main() { 7 ; CHECK-LABEL: @main 8 ; CHECK: call i32 bitcast 9 entry: 10 %tmp = call i32 bitcast (i8* (i32*)* @ctime to i32 (i32*)*)( i32* null ) ; <i32> [#uses=1] 11 ret i32 %tmp 12 } 13 14 declare i8* @ctime(i32*) 15 16 define internal { i8 } @foo(i32*) { 17 entry: 18 ret { i8 } { i8 0 } 19 } 20 21 define void @test_struct_ret() { 22 ; CHECK-LABEL: @test_struct_ret 23 ; CHECK-NOT: bitcast 24 entry: 25 %0 = call { i8 } bitcast ({ i8 } (i32*)* @foo to { i8 } (i16*)*)(i16* null) 26 ret void 27 } 28