mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
[FastISel][ARM] Use MOVT/MOVW if the subtarget requests it.
This change is also in preparation for a future change to make sure that the constant materialization uses MOVT/MOVW when available and not a load from the constant pool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -546,6 +546,9 @@ unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, MVT VT) {
|
||||
}
|
||||
}
|
||||
|
||||
if (Subtarget->useMovt(*FuncInfo.MF))
|
||||
return FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue());
|
||||
|
||||
// Load from constant pool. For now 32-bit only.
|
||||
if (VT != MVT::i32)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user