[llvm-commits] [llvm] r75983 - in /llvm/trunk/lib/Target/SystemZ: SystemZISelLowering.cpp SystemZInstrInfo.td

Anton Korobeynikov asl at math.spbu.ru
Thu Jul 16 07:07:24 PDT 2009


Author: asl
Date: Thu Jul 16 09:07:24 2009
New Revision: 75983

URL: http://llvm.org/viewvc/llvm-project?rev=75983&view=rev
Log:
Exapnd br_jt into indirect branch. Provide pattern for indirect branches.

Modified:
    llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
    llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td

Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=75983&r1=75982&r2=75983&view=diff

==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Thu Jul 16 09:07:24 2009
@@ -62,6 +62,7 @@
 
   setOperationAction(ISD::RET,              MVT::Other, Custom);
 
+  setOperationAction(ISD::BR_JT,            MVT::Other, Expand);
   setOperationAction(ISD::BRCOND,           MVT::Other, Expand);
   setOperationAction(ISD::BR_CC,            MVT::i32, Custom);
   setOperationAction(ISD::BR_CC,            MVT::i64, Custom);

Modified: llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td?rev=75983&r1=75982&r2=75983&view=diff

==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td Thu Jul 16 09:07:24 2009
@@ -99,6 +99,12 @@
   let isBarrier = 1 in
     def JMP  : Pseudo<(outs), (ins brtarget:$dst), "j\t{$dst}", [(br bb:$dst)]>;
 
+  let isBarrier = 1, isIndirectBranch = 1 in {
+    def JMPr   : Pseudo<(outs), (ins GR64:$dst), "br\t{$dst}", [(brind GR64:$dst)]>;
+    // FIXME: displacement here is 12 bits
+    def JMPrri : Pseudo<(outs), (ins rriaddr:$dst), "b\t{$dst}", [(brind rriaddr:$dst)]>;
+  }
+
   let Uses = [PSW] in {
     def JE  : Pseudo<(outs), (ins brtarget:$dst),
                      "je\t$dst",





More information about the llvm-commits mailing list