[all-commits] [llvm/llvm-project] ddd7d3: [RegAlloc] Fix assertion failure caused by inline ...
Qi Hu via All-commits
all-commits at lists.llvm.org
Tue Jul 25 16:12:10 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ddd7d35c6c2697eec8d665e70d4e1395003cbec9
https://github.com/llvm/llvm-project/commit/ddd7d35c6c2697eec8d665e70d4e1395003cbec9
Author: Qi Hu <qi.hu at huawei.com>
Date: 2023-07-25 (Tue, 25 Jul 2023)
Changed paths:
M llvm/lib/CodeGen/RegAllocFast.cpp
A llvm/test/CodeGen/X86/inline-asm-assertion.ll
Log Message:
-----------
[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.
More information about the All-commits
mailing list