aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/SPARC/trap.ll
blob: 12ce8485f0a40d5a25c4481a96873c2701cead36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; RUN: llc -mtriple=sparc-linux-gnu < %s -show-mc-encoding -verify-machineinstrs | FileCheck %s

define void @test1() {
  tail call void @llvm.trap()
  unreachable

; CHECK-LABEL: test1:
; CHECK: ta 5 ! encoding: [0x91,0xd0,0x20,0x05]
}

declare void @llvm.trap()

; CHECK-LABEL: testdebugtrap:
; CHECK: ta 1 ! encoding: [0x91,0xd0,0x20,0x01]
define void @testdebugtrap() {
entry:
  call void @llvm.debugtrap()
  ret void
}

declare void @llvm.debugtrap()