mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
FastISel support for i1 constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56068 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
369e98760b
commit
8211648757
@ -33,8 +33,16 @@ unsigned FastISel::getRegForValue(Value *V) {
|
||||
return Reg;
|
||||
|
||||
MVT::SimpleValueType VT = TLI.getValueType(V->getType()).getSimpleVT();
|
||||
if (!TLI.isTypeLegal(VT))
|
||||
return 0;
|
||||
|
||||
// Ignore illegal types.
|
||||
if (!TLI.isTypeLegal(VT)) {
|
||||
// Promote MVT::i1 to a legal type though, because it's common and easy.
|
||||
if (VT == MVT::i1)
|
||||
VT = TLI.getTypeToTransformTo(VT).getSimpleVT();
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
|
||||
if (CI->getValue().getActiveBits() > 64)
|
||||
return TargetMaterializeConstant(CI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user