mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
CodeGen: soften f16 type by default instead of marking legal.
Actual support for softening f16 operations is still limited, and can be added when it's needed. But Soften is much closer to being a useful thing to try than keeping it Legal when no registers can actually hold such values. Longer term, we probably want something between Soften and Promote semantics for most targets, it'll be more efficient to promote the 4 basic operations to f32 than libcall them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213372 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1104,6 +1104,13 @@ void TargetLoweringBase::computeRegisterProperties() {
|
||||
}
|
||||
}
|
||||
|
||||
if (!isTypeLegal(MVT::f16)) {
|
||||
NumRegistersForVT[MVT::f16] = NumRegistersForVT[MVT::i16];
|
||||
RegisterTypeForVT[MVT::f16] = RegisterTypeForVT[MVT::i16];
|
||||
TransformToType[MVT::f16] = MVT::i16;
|
||||
ValueTypeActions.setTypeAction(MVT::f16, TypeSoftenFloat);
|
||||
}
|
||||
|
||||
// Loop over all of the vector value types to see which need transformations.
|
||||
for (unsigned i = MVT::FIRST_VECTOR_VALUETYPE;
|
||||
i <= (unsigned)MVT::LAST_VECTOR_VALUETYPE; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user