[llvm-commits] [llvm] r55427 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp

Dan Gohman gohman at apple.com
Wed Aug 27 11:15:05 PDT 2008


Author: djg
Date: Wed Aug 27 13:15:05 2008
New Revision: 55427

URL: http://llvm.org/viewvc/llvm-project?rev=55427&view=rev
Log:
Don't check TLI.getOperationAction. The FastISel way is to
just try to do the action and let the tablegen-generated code
determine if there is target-support for an operation.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55427&r1=55426&r2=55427&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Wed Aug 27 13:15:05 2008
@@ -458,10 +458,8 @@
 unsigned FastISel::FastEmit_ri_(MVT::SimpleValueType VT, ISD::NodeType Opcode,
                                 unsigned Op0, uint64_t Imm,
                                 MVT::SimpleValueType ImmType) {
-  unsigned ResultReg = 0;
   // First check if immediate type is legal. If not, we can't use the ri form.
-  if (TLI.getOperationAction(ISD::Constant, ImmType) == TargetLowering::Legal)
-    ResultReg = FastEmit_ri(VT, VT, Opcode, Op0, Imm);
+  unsigned ResultReg = FastEmit_ri(VT, VT, Opcode, Op0, Imm);
   if (ResultReg != 0)
     return ResultReg;
   unsigned MaterialReg = FastEmit_i(ImmType, ImmType, ISD::Constant, Imm);
@@ -477,10 +475,8 @@
 unsigned FastISel::FastEmit_rf_(MVT::SimpleValueType VT, ISD::NodeType Opcode,
                                 unsigned Op0, ConstantFP *FPImm,
                                 MVT::SimpleValueType ImmType) {
-  unsigned ResultReg = 0;
   // First check if immediate type is legal. If not, we can't use the rf form.
-  if (TLI.getOperationAction(ISD::Constant, ImmType) == TargetLowering::Legal)
-    ResultReg = FastEmit_rf(VT, VT, Opcode, Op0, FPImm);
+  unsigned ResultReg = FastEmit_rf(VT, VT, Opcode, Op0, FPImm);
   if (ResultReg != 0)
     return ResultReg;
 





More information about the llvm-commits mailing list