mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 21:00:29 +00:00
Fix a recent fast-isel coverage regression - don't bail out before
giving the target a chance to materialize constants. llvm-svn: 56605
This commit is contained in:
parent
ed3216739e
commit
1776533304
@ -75,16 +75,17 @@ unsigned FastISel::getRegForValue(Value *V) {
|
||||
} else if (isa<UndefValue>(V)) {
|
||||
Reg = createResultReg(TLI.getRegClassFor(VT));
|
||||
BuildMI(MBB, TII.get(TargetInstrInfo::IMPLICIT_DEF), Reg);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// If target-independent code couldn't handle the value, give target-specific
|
||||
// code a try.
|
||||
if (!Reg && isa<Constant>(V))
|
||||
Reg = TargetMaterializeConstant(cast<Constant>(V));
|
||||
|
||||
// Don't cache constant materializations in the general ValueMap.
|
||||
// To do so would require tracking what uses they dominate.
|
||||
LocalValueMap[V] = Reg;
|
||||
if (Reg != 0)
|
||||
LocalValueMap[V] = Reg;
|
||||
return Reg;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user