1 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=functions --test FileCheck --test-arg --check-prefixes=INTERESTING --test-arg %s --test-arg --input-file %s -o %t
2 ; RUN: FileCheck --check-prefixes=RESULT --input-file=%t %s
4 ; FIXME: This testcase exhibits nonsensical behavior. The first
5 ; function has blockaddress references. When the second function is
6 ; deleted, it causes the blockreferences from the first to be replaced
9 ; INTERESTING: @blockaddr.table.other
11 ; RESULT: @blockaddr.table.other = private unnamed_addr constant [2 x ptr] [ptr inttoptr (i32 1 to ptr), ptr inttoptr (i32 1 to ptr)]
13 @blockaddr.table.other = private unnamed_addr constant [2 x ptr] [ptr blockaddress(@bar, %L1), ptr blockaddress(@bar, %L2)]
16 ; RESULT: define i32 @bar(
17 define i32 @bar(i64 %arg0) {
19 %gep = getelementptr inbounds [2 x ptr], ptr @blockaddr.table.other, i64 0, i64 %arg0
20 %load = load ptr, ptr %gep, align 8
21 indirectbr ptr %load, [label %L2, label %L1]
24 %phi = phi i32 [ 1, %L2 ], [ 2, %entry ]
32 define void @unused() {