linux-packaging-mono/external/llvm/test/CodeGen/AMDGPU/r600-legalize-umax-bug.ll
Xamarin Public Jenkins (auto-signing) e19d552987 Imported Upstream version 5.18.0.161
Former-commit-id: 4db48158d3a35497b8f118ab21b5f08ac3d86d98
2018-10-19 08:34:24 +00:00

17 lines
470 B
LLVM

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