Generalize this to look in the regular ValueMap in addition to
authorDan Gohman <gohman@apple.com>
Mon, 21 Jun 2010 14:17:46 +0000 (14:17 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 21 Jun 2010 14:17:46 +0000 (14:17 +0000)
the LocalValueMap, to make it more flexible when fast-isel isn't
proceding straight top-down.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106414 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/FastISel.cpp

index d21ba233e9aa4523781f6871e1339f7b9f75b768..58d8344479ca2d6ef20aac2984d143096f41e6df 100644 (file)
@@ -162,7 +162,7 @@ unsigned FastISel::materializeRegForValue(const Value *V, MVT VT) {
     }
   } else if (const Operator *Op = dyn_cast<Operator>(V)) {
     if (!SelectOperator(Op, Op->getOpcode())) return 0;
-    Reg = LocalValueMap[Op];
+    Reg = lookUpRegForValue(Op);
   } else if (isa<UndefValue>(V)) {
     Reg = createResultReg(TLI.getRegClassFor(VT));
     BuildMI(MBB, DL, TII.get(TargetOpcode::IMPLICIT_DEF), Reg);