1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=reg2mem -S < %s | FileCheck %s
7 ; CHECK-NEXT: [[A_REG2MEM:%.*]] = alloca i64, align 8
8 ; CHECK-NEXT: %"reg2mem alloca point" = bitcast i32 0 to i32
9 ; CHECK-NEXT: [[A:%.*]] = callbr i64 asm "", "=r,r,!i"(i64 0)
10 ; CHECK-NEXT: to label [[THEN:%.*]] [label %entry.else_crit_edge]
11 ; CHECK: entry.else_crit_edge:
12 ; CHECK-NEXT: store i64 [[A]], ptr [[A_REG2MEM]], align 4
13 ; CHECK-NEXT: br label [[ELSE:%.*]]
15 ; CHECK-NEXT: store i64 [[A]], ptr [[A_REG2MEM]], align 4
16 ; CHECK-NEXT: [[A_RELOAD:%.*]] = load i64, ptr [[A_REG2MEM]], align 4
17 ; CHECK-NEXT: [[B:%.*]] = inttoptr i64 [[A_RELOAD]] to ptr
18 ; CHECK-NEXT: br label [[ELSE]]
20 ; CHECK-NEXT: ret void
23 %a = callbr i64 asm "", "=r,r,!i"(i64 0)
24 to label %then [label %else]
27 %b = inttoptr i64 %a to ptr