
Because most of tests assume target-abi=`lp64d`, adding the corresponding feature is reasonable. rg -l loongarch -g '!*.s' | xargs sed -i '/mtriple=loongarch/ {/-mattr=/!{/target-abi/! s/mtriple=loongarch.. /&-mattr=+d /}}'
15 lines
530 B
LLVM
15 lines
530 B
LLVM
; RUN: not llc --mtriple=loongarch32 -mattr=+d 2>&1 < %s | FileCheck %s
|
|
; RUN: not llc --mtriple=loongarch64 -mattr=+d 2>&1 < %s | FileCheck %s
|
|
|
|
define i32 @non_exit_r32(i32 %a) nounwind {
|
|
; CHECK: error: couldn't allocate input reg for constraint '{$r32}'
|
|
%1 = tail call i32 asm "addi.w $0, $1, 1", "=r,{$r32}"(i32 %a)
|
|
ret i32 %1
|
|
}
|
|
|
|
define i32 @non_exit_foo(i32 %a) nounwind {
|
|
; CHECK: error: couldn't allocate input reg for constraint '{$foo}'
|
|
%1 = tail call i32 asm "addi.w $0, $1, 1", "=r,{$foo}"(i32 %a)
|
|
ret i32 %1
|
|
}
|