1; RUN: llc -march=r600 -mcpu=cypress -start-after safe-stack %s -o - | FileCheck %s
2; Don't crash
3
4; CHECK: MAX_UINT
5define amdgpu_kernel void @test(i64 addrspace(1)* %out) {
6bb:
7  store i64 2, i64 addrspace(1)* %out
8  %tmp = load i64, i64 addrspace(1)* %out
9  br label %jump
10
11jump:                                             ; preds = %bb
12  %tmp1 = icmp ugt i64 %tmp, 4
13  %umax = select i1 %tmp1, i64 %tmp, i64 4
14  store i64 %umax, i64 addrspace(1)* %out
15  ret void
16}
17