1 ; RUN: not llc --mtriple=loongarch32 < %s 2>&1 | FileCheck %s
2 ; RUN: not llc --mtriple=loongarch64 < %s 2>&1 | FileCheck %s
4 declare void @llvm.loongarch.dbar(i32)
5 declare void @llvm.loongarch.ibar(i32)
6 declare void @llvm.loongarch.break(i32)
7 declare void @llvm.loongarch.movgr2fcsr(i32, i32)
8 declare i32 @llvm.loongarch.movfcsr2gr(i32)
9 declare void @llvm.loongarch.syscall(i32)
11 define void @dbar_not_constant(i32 %x) nounwind {
12 ; CHECK: immarg operand has non-immediate parameter
14 call void @llvm.loongarch.dbar(i32 %x)
18 define void @ibar(i32 %x) nounwind {
19 ; CHECK: immarg operand has non-immediate parameter
21 call void @llvm.loongarch.ibar(i32 %x)
25 define void @break(i32 %x) nounwind {
26 ; CHECK: immarg operand has non-immediate parameter
28 call void @llvm.loongarch.break(i32 %x)
32 define void @movgr2fcsr(i32 %a) nounwind {
33 ; CHECK: immarg operand has non-immediate parameter
35 call void @llvm.loongarch.movgr2fcsr(i32 %a, i32 %a)
39 define i32 @movfcsr2gr(i32 %a) nounwind {
40 ; CHECK: immarg operand has non-immediate parameter
42 %res = call i32 @llvm.loongarch.movfcsr2gr(i32 %a)
46 define void @syscall(i32 %x) nounwind {
47 ; CHECK: immarg operand has non-immediate parameter
49 call void @llvm.loongarch.syscall(i32 %x)