blob: ff1c1d2798d6467449139ba5aad0f3a852229d98 [file] [edit]
; RUN: not llc -mtriple=aarch64-linux-gnu < %s 2>&1 | FileCheck %s
; An aggregate that is not 1, 8, 16, 32, 64 or 128 bits wide has no simple
; value type (MVT::Other). Check that using it with a register constraint is
; diagnosed instead of crashing in getRegForInlineAsmConstraint.
%struct.S = type { i64, i64, i64 }
; CHECK: error: cannot handle indirect register inputs yet for constraint 'r'
define void @input_r(ptr %p) {
call void asm sideeffect "", "*r"(ptr elementtype(%struct.S) %p)
ret void
}
; CHECK: error: cannot handle indirect register inputs yet for constraint 'x'
define void @input_x(ptr %p) {
call void asm sideeffect "", "*x"(ptr elementtype(%struct.S) %p)
ret void
}
; CHECK: error: cannot handle indirect register inputs yet for constraint 'w'
define void @input_w(ptr %p) {
call void asm sideeffect "", "*w"(ptr elementtype(%struct.S) %p)
ret void
}
; CHECK: error: could not allocate output register for constraint 'r'
define void @output_r(ptr %p) {
call void asm sideeffect "", "=*r"(ptr elementtype(%struct.S) %p)
ret void
}
; CHECK: error: could not allocate output register for constraint 'x'
define void @output_x(ptr %p) {
call void asm sideeffect "", "=*x"(ptr elementtype(%struct.S) %p)
ret void
}
; CHECK: error: could not allocate output register for constraint 'w'
define void @output_w(ptr %p) {
call void asm sideeffect "", "=*w"(ptr elementtype(%struct.S) %p)
ret void
}