diff options
author | Qi Hu <qi.hu@huawei.com> | 2023-07-12 10:58:00 -0400 |
---|---|---|
committer | Bryan Chan <bryan.chan@huawei.com> | 2023-07-25 19:21:03 -0400 |
commit | ddd7d35c6c2697eec8d665e70d4e1395003cbec9 (patch) | |
tree | a8e6f4bcb7c6da3e3a2cb7b352f1c31f751f7c38 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | f5ae7e3489f317ce8c60df7258dbe31c8f988aa9 (diff) | |
download | llvm-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