aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-27 18:15:05 +0000
committerDan Gohman <gohman@apple.com>2008-08-27 18:15:05 +0000
commit151ed61a2f9c3482d35a54d502e7cd147f22a21b (patch)
tree55996bea2da401c80ccb45748a5ab680f34e57fa /lib/CodeGen
parentad368ac2b5f303050e9aaa357e2b806fae38f81b (diff)
downloadexternal_llvm-151ed61a2f9c3482d35a54d502e7cd147f22a21b.zip
external_llvm-151ed61a2f9c3482d35a54d502e7cd147f22a21b.tar.gz
external_llvm-151ed61a2f9c3482d35a54d502e7cd147f22a21b.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 78201c9..6e2bd4b 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -458,10 +458,8 @@ unsigned FastISel::FastEmit_rri(MVT::SimpleValueType, MVT::SimpleValueType,
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_ri_(MVT::SimpleValueType VT, ISD::NodeType Opcode,
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;