mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-24 12:29:33 +00:00
Generalize this code to handle Instructions in addition to ConstantExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4be71e112
commit
32acbc1e50
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user