Closed
Description
The code in https://godbolt.org/z/naaYMjh97 hits a backend assertion when built in assertions mode.
target triple = "amdgcn-amd-amdhsa"
define amdgpu_kernel void @_start(ptr %0) {
%2 = select i1 false, ptr %0, ptr addrspacecast (ptr addrspace(5) null to ptr)
%3 = getelementptr i8, ptr %2, i64 -1
%4 = load i8, ptr %3, align 1
%5 = icmp eq i8 %4, 0
br label %6
6:
br i1 %5, label %7, label %6
7:
ret void
}
$ llc bug.bc -mcpu=gfx90a
llc: /root/llvm-project/llvm/include/llvm/CodeGen/MachineOperand.h:370: llvm::Register llvm::MachineOperand::getReg() const: Assertion `isReg() && "This is not a register operand!"' failed.