diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-14 02:33:23 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-14 02:33:23 +0000 |
commit | 5f40d349588a5625921be5fb486425ae763e29a8 (patch) | |
tree | 8dc034163aa605e9217d957416e112d1a3165c97 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | a148a1d40e8605efc2ae8a9e711aa72e35a9758c (diff) | |
download | bcm5719-llvm-5f40d349588a5625921be5fb486425ae763e29a8.tar.gz bcm5719-llvm-5f40d349588a5625921be5fb486425ae763e29a8.zip |
Generalize this code to handle Instructions in addition to ConstantExprs.
llvm-svn: 101210
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index 9b67b57c926..78e8f497ade 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -116,9 +116,9 @@ unsigned FastISel::getRegForValue(Value *V) { Reg = FastEmit_r(IntVT.getSimpleVT(), VT, ISD::SINT_TO_FP, IntegerReg); } } - } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { - if (!SelectOperator(CE, CE->getOpcode())) return 0; - Reg = LocalValueMap[CE]; + } else if (Operator *Op = dyn_cast<Operator>(V)) { + if (!SelectOperator(Op, Op->getOpcode())) return 0; + Reg = LocalValueMap[Op]; } else if (isa<UndefValue>(V)) { Reg = createResultReg(TLI.getRegClassFor(VT)); BuildMI(MBB, DL, TII.get(TargetOpcode::IMPLICIT_DEF), Reg); |