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