xref: /llvm-project/llvm/test/CodeGen/LoongArch/target-abi.ll (revision 30410018d32b2cc19552c6d6a3b7b6de84d99382)
1; RUN: llc --mtriple=loongarch32 --mattr=+d --target-abi=ilp32s < %s 2>&1 \
2; RUN:   | FileCheck %s -DABI=ilp32s --check-prefixes=CHECK,WARNING
3; RUN: llc --mtriple=loongarch32 --mattr=+d --target-abi=ilp32f < %s 2>&1 \
4; RUN:   | FileCheck %s -DABI=ilp32f --check-prefixes=CHECK,WARNING
5; RUN: llc --mtriple=loongarch32 --mattr=+d --target-abi=ilp32d < %s 2>&1 \
6; RUN:   | FileCheck %s -DABI=ilp32d --check-prefixes=CHECK,WARNING
7; RUN: llc --mtriple=loongarch64 --mattr=+d --target-abi=lp64f < %s 2>&1 \
8; RUN:   | FileCheck %s -DABI=lp64f --check-prefixes=CHECK,WARNING
9
10; RUN: llc --mtriple=loongarch64 --mattr=+d --target-abi=lp64s < %s 2>&1 \
11; RUN:   | FileCheck %s --check-prefixes=CHECK,NO-WARNING
12; RUN: llc --mtriple=loongarch64 --mattr=+d --target-abi=lp64d < %s 2>&1 \
13; RUN:   | FileCheck %s --check-prefixes=CHECK,NO-WARNING
14
15;; Check if the ABI has been standardized; issue a warning if it hasn't.
16
17; WARNING: warning: '[[ABI]]' has not been standardized
18
19; NO-WARNING-NOT: warning
20
21define void @nothing() nounwind {
22; CHECK-LABEL: nothing:
23; CHECK:       # %bb.0:
24; CHECK-NEXT:  ret
25  ret void
26}
27