[PATCH] D21155: [SystemZ] Support Compare and Traps
Marcin KoĆcielnicki via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 14:24:57 PDT 2016
koriakin added a comment.
In addition to inline comments: there is no test for unconditional trap, or for non-fused conditional trap (you can get that one easily by a floating point comparison).
================
Comment at: lib/Target/SystemZ/SystemZInstrFormats.td:205
@@ -204,1 +204,3 @@
+class InstRIEa<bits<16> op, dag outs, dag ins, string asmstr, list<dag> pattern>
+ : InstSystemZ<6, outs, ins, asmstr, pattern> {
----------------
nit: would be good to have them in order: InstRIEa, InstRIEb, InstRIEc.
================
Comment at: lib/Target/SystemZ/SystemZInstrInfo.td:71
@@ +70,3 @@
+let isTerminator = 1, isBarrier = 1, hasCtrlDep = 1, usesCustomInserter = 1 in {
+ def Trap : Alias<2, (outs), (ins), [(trap)]>;
+}
----------------
Alias<4 would be slightly more correct, though I don't think anything actually uses size information for aliases
================
Comment at: lib/Target/SystemZ/SystemZInstrInfo.td:74
@@ +73,3 @@
+
+let isTerminator = 1, isBarrier = 1, hasCtrlDep = 1, Uses = [CC] in {
+ def CondTrap : Alias<2, (outs), (ins cond4:$valid, cond4:$R1), []>;
----------------
This is not a barrier, and it does use custom inserter.
================
Comment at: lib/Target/SystemZ/SystemZInstrInfo.td:170
@@ +169,3 @@
+
+ let isTerminator = 1, isBarrier = 1, hasCtrlDep = 1 in {
+ def RT : InstRRFc<0xB972, (outs), (ins GR32:$R1, GR32:$R2, ccmask:$M3),
----------------
Not barriers.
================
Comment at: lib/Target/SystemZ/SystemZInstrInfo.td:293
@@ +292,3 @@
+
+ let isBarrier = 1, hasCtrlDep = 1, isTerminator = 1, M3 = ccmask in {
+ def CRT : InstRRFc<0xB972, (outs), (ins GR32:$R1, GR32:$R2),
----------------
Again, not barriers.
http://reviews.llvm.org/D21155
More information about the llvm-commits
mailing list