Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions llvm/lib/CodeGen/RegAllocBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,8 @@ void RegAllocBase::cleanupFailedVReg(Register FailedReg, MCRegister PhysReg,
for (MCRegAliasIterator Aliases(PhysReg, TRI, true); Aliases.isValid();
++Aliases) {
for (MachineOperand &MO : MRI->reg_operands(*Aliases)) {
if (MO.readsReg()) {
if (MO.readsReg())
MO.setIsUndef(true);
LIS->removeAllRegUnitsForPhysReg(MO.getReg());
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
; RUN: not llc -mcpu=gfx1100 -mtriple=amdgcn-amd-amdhsa -stress-regalloc=4 -filetype=null -verify-machineinstrs %s 2>&1 | FileCheck %s

; CHECK: error: <unknown>:0:0: ran out of registers during register allocation in function 'f'
; CHECK-NOT: Bad machine code

define <16 x half> @f(i1 %LGV2, <16 x half> %0) {
BB:
br i1 %LGV2, label %SW_C3, label %SW_C

SW_C: ; preds = %BB
%B1 = fmul <16 x half> %0, zeroinitializer
ret <16 x half> %B1

SW_C3: ; preds = %BB
ret <16 x half> <half 0xH0000, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison, half poison>
}