1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 -mattr=+d --verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc --mtriple=loongarch64 -mattr=+d --verify-machineinstrs < %s | FileCheck %s
5 ;; Verify that we lower @llvm.trap() and @llvm.debugtrap() correctly.
7 declare void @llvm.trap()
8 declare void @llvm.debugtrap()
10 define void @test_trap() nounwind {
11 ; CHECK-LABEL: test_trap:
13 ; CHECK-NEXT: amswap.w $zero, $ra, $zero
15 tail call void @llvm.trap()
19 define void @test_debugtrap() nounwind {
20 ; CHECK-LABEL: test_debugtrap:
24 tail call void @llvm.debugtrap()