aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorQi Hu <qi.hu@huawei.com>2023-07-12 10:58:00 -0400
committerBryan Chan <bryan.chan@huawei.com>2023-07-25 19:21:03 -0400
commitddd7d35c6c2697eec8d665e70d4e1395003cbec9 (patch)
treea8e6f4bcb7c6da3e3a2cb7b352f1c31f751f7c38 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parentf5ae7e3489f317ce8c60df7258dbe31c8f988aa9 (diff)
downloadllvm-ddd7d35c6c2697eec8d665e70d4e1395003cbec9.zip
llvm-ddd7d35c6c2697eec8d665e70d4e1395003cbec9.tar.gz
llvm-ddd7d35c6c2697eec8d665e70d4e1395003cbec9.tar.bz2
[RegAlloc] Fix assertion failure caused by inline assembly
When inline assembly code requests more registers than available, the MachineInstr::emitError function in the RegAllocFast pass emits an error but doesn't stop the pass, and then the compiler crashes later with an assertion failure. This commit, mimicking the RegAllocGreedy pass, assigns a random physical register, and therefore avoids the crash after producing the diagnostic. This problem has been observed for both rustc and clang, while it doesn't occur in gcc.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions