1 ; RUN: llvm-extract -S --bb=func:bb4 -aggregate-extracted-args=0 < %s | FileCheck %s
3 ; FIXME: aggregate-extracted-args doesn't work for other reasons
4 ; XUN: llvm-extract -S --bb=func:bb4 -aggregate-extracted-args=1 < %s | FileCheck %s
6 target datalayout = "A5-G1-ni:7"
8 ; Check that there's no assert from incorrect pointer types used in the new arguments.
10 ; CHECK-LABEL: define dso_local void @func.bb4(i32 %orig.arg.0, ptr addrspace(5) %tmp1.out, ptr addrspace(5) %add.out) {
12 ; CHECK-NEXT: %tmp0 = add i32 0, 0
13 ; CHECK-NEXT: %tmp1 = add i32 1, 1
14 ; CHECK-NEXT: store i32 %tmp1, ptr addrspace(5) %tmp1.out, align 4
15 ; CHECK-NEXT: %add = add i32 %tmp0, %orig.arg.0
16 ; CHECK-NEXT: store i32 %add, ptr addrspace(5) %add.out, align 4
17 ; CHECK-NEXT: br label %bb5.exitStub
18 define void @func(i32 %orig.arg.0, ptr addrspace(1) %orig.arg.1) {
25 %add = add i32 %tmp0, %orig.arg.0
28 bb5: ; preds = %bb5, %bb4
29 %tmp6 = phi i32 [ %add, %bb4 ], [ 0, %bb5 ]
30 %tmp7 = phi i32 [ %tmp1, %bb4 ], [ 2, %bb5 ]