llvm-mirror/test/CodeGen/AArch64/no-fp-asm-clobbers-crash.ll
George Burgess IV d60307ede1 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

llvm-svn: 316374
2017-10-23 20:46:36 +00:00

19 lines
454 B
LLVM

; RUN: llc < %s | FileCheck %s
;
; Be sure that we ignore clobbers of unallocatable registers, rather than
; crashing.
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64"
; CHECK-LABEL: foo:
; CHECK: ret
define void @foo() #0 {
entry:
call void asm sideeffect "", "~{v0}"()
call void asm sideeffect "", "~{s0}"()
ret void
}
attributes #0 = { nounwind "target-features"="-crypto,-fp-armv8,-neon" }