]> granicus.if.org Git - llvm/commit
Don't crash when we see unallocatable registers in clobbers
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 23 Oct 2017 20:46:36 +0000 (20:46 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 23 Oct 2017 20:46:36 +0000 (20:46 +0000)
commitd7958d5ac0c1e979dec35ea26a981532e094b5b2
tree6dd74829ddb3fd9d16b4d865a3dca8247749db88
parentfa601dee99f6b086ebdb266153b6597b204a2cd4
Don't crash when we see unallocatable registers in clobbers

This fixes a bug where we'd crash given code like the test-case from
https://bugs.llvm.org/show_bug.cgi?id=30792 . Instead, we let the
offending clobber silently slide through.

This doesn't fully fix said bug, since the assembler will still complain
the moment it sees a crypto/fp/vector op, and we still don't diagnose
calls that require vector regs.

Differential Revision: https://reviews.llvm.org/D39030

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316374 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/AArch64/no-fp-asm-clobbers-crash.ll [new file with mode: 0644]