summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrInfo.td4
-rw-r--r--llvm/test/CodeGen/SPARC/trap.ll2
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.td b/llvm/lib/Target/Sparc/SparcInstrInfo.td
index 9dee18f2563..5b7fb3c485e 100644
--- a/llvm/lib/Target/Sparc/SparcInstrInfo.td
+++ b/llvm/lib/Target/Sparc/SparcInstrInfo.td
@@ -1009,8 +1009,8 @@ let DecoderNamespace = "SparcV9", DecoderMethod = "DecodeTRAP", Predicates = [Ha
let isBarrier = 1, isTerminator = 1, rd = 0b01000, rs1 = 0, simm13 = 5 in
def TA5 : F3_2<0b10, 0b111010, (outs), (ins), "ta 5", [(trap)]>;
-def : Pat<(debugtrap),
- (TRAPri (i32 G0), (i32 1), (i32 8))>;
+let hasSideEffects = 1, rd = 0b01000, rs1 = 0, simm13 = 1 in
+ def TA1 : F3_2<0b10, 0b111010, (outs), (ins), "ta 1", [(debugtrap)]>;
// Section B.28 - Read State Register Instructions
let rs2 = 0 in
diff --git a/llvm/test/CodeGen/SPARC/trap.ll b/llvm/test/CodeGen/SPARC/trap.ll
index c2f66ca6cbd..12ce8485f0a 100644
--- a/llvm/test/CodeGen/SPARC/trap.ll
+++ b/llvm/test/CodeGen/SPARC/trap.ll
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=sparc-linux-gnu < %s -show-mc-encoding | FileCheck %s
+; RUN: llc -mtriple=sparc-linux-gnu < %s -show-mc-encoding -verify-machineinstrs | FileCheck %s
define void @test1() {
tail call void @llvm.trap()
OpenPOWER on IntegriCloud