Most other registers are allocatable and therefore cannot be used. This issue was flagged by the machine verifier, because reading other registers is considered reading from an undefined register. Differential Revision: https://reviews.llvm.org/D96969
13 lines
258 B
LLVM
13 lines
258 B
LLVM
; RUN: not --crash llc -O0 < %s -march=avr 2>&1 | FileCheck %s
|
|
|
|
define void @foo() {
|
|
entry:
|
|
; CHECK: Invalid register name "r28".
|
|
%val1 = call i8 @llvm.read_register.i8(metadata !0)
|
|
ret void
|
|
}
|
|
|
|
declare i8 @llvm.read_register.i8(metadata)
|
|
|
|
!0 = !{!"r28"}
|