1 ; RUN: opt < %s -inline -scalarrepl -S | FileCheck %s 2 target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128" 3 4 define i32 @test1f(i32 %i) { 5 ret i32 %i 6 } 7 8 define i32 @test1(i32 %W) { 9 %X = call i32 @test1f(i32 7) 10 %Y = add i32 %X, %W 11 ret i32 %Y 12 ; CHECK: @test1( 13 ; CHECK-NEXT: %Y = add i32 7, %W 14 ; CHECK-NEXT: ret i32 %Y 15 } 16 17 18 19 ; rdar://7339069 20 21 %T = type { i32, i32 } 22 23 ; CHECK-NOT: @test2f 24 define internal %T* @test2f(i1 %cond, %T* %P) { 25 br i1 %cond, label %T, label %F 26 27 T: 28 %A = getelementptr %T* %P, i32 0, i32 0 29 store i32 42, i32* %A 30 ret %T* %P 31 32 F: 33 ret %T* %P 34 } 35 36 define i32 @test2(i1 %cond) { 37 %A = alloca %T 38 39 %B = call %T* @test2f(i1 %cond, %T* %A) 40 %C = getelementptr %T* %B, i32 0, i32 0 41 %D = load i32* %C 42 ret i32 %D 43 44 ; CHECK: @test2( 45 ; CHECK-NOT: = alloca 46 ; CHECK: ret i32 47 } 48