mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Check for type legality before materializing integer constants in fast isel. With this change,
all of MultiSource/Applications passes on Darwin/X86 under FastISel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55982 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
70f684fcf9
commit
baf37cd556
@ -39,6 +39,8 @@ unsigned FastISel::getRegForValue(Value *V) {
|
||||
MBB->getParent()->getConstantPool());
|
||||
// Don't cache constant materializations. To do so would require
|
||||
// tracking what uses they dominate.
|
||||
if (!TLI.isTypeLegal(VT))
|
||||
return false;
|
||||
Reg = FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue());
|
||||
} else if (isa<GlobalValue>(V)) {
|
||||
return TargetMaterializeConstant(dyn_cast<Constant>(V),
|
||||
|
Loading…
x
Reference in New Issue
Block a user