1; RUN: opt -mem2reg < %s -S | FileCheck %s
2
3
4; CHECK-LABEL: void @patatino()
5; CHECK-NEXT: ret void
6
7; CHECK-LABEL: cantreachme:
8; CHECK-NEXT: %dec = add nsw i32 undef, -1
9; CHECK-NEXT: br label %cantreachme
10
11define void @patatino() {
12  %a = alloca i32, align 4
13  ret void
14cantreachme:
15  %dec = add nsw i32 %tmp, -1
16  store i32 %dec, i32* %a
17  store i32 %tmp, i32* %a
18  %tmp = load i32, i32* %a
19  br label %cantreachme
20}
21