mirror of
https://github.com/RPCS3/llvm.git
synced 2025-05-14 17:36:29 +00:00

The ta instruction will always trap, regardless of the value of the integer condition codes. TRAPri is marked as using icc, so we cannot use a pattern for TRAPri to implement ta 1, as verify-machineinstrs can complain that icc is not defined. Instead we implement ta 1 the same way as ta 5. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337236 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
456 B
LLVM
22 lines
456 B
LLVM
; 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()
|