[llvm] [NFC] Add useFPRegsForHalfType(). (PR #74147)
Harald van Dijk via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 17:25:13 PST 2024
================
@@ -505,12 +505,18 @@ class TargetLoweringBase {
return TypePromoteInteger;
}
- // Return true if the half type should be passed around as i16, but promoted
- // to float around arithmetic. The default behavior is to pass around as
- // float and convert around loads/stores/bitcasts and other places where
- // the size matters.
+ // Return true if the half type should be promoted using soft promotion rules
+ // where each operation is promoted to f32 individually, then converted to
+ // fp16. The default behavior is to promote links of operations, keeping
+ // intermediate results in f32 precision and range.
virtual bool softPromoteHalfType() const { return false; }
+ // Return true if, for soft-promoted half, the half type should be passed
+ // around as f32. The default behavior is to pass around as i16. If
----------------
hvdijk wrote:
It does, and agreed that that would be clearer. Updated to say "passed to and returned from functions".
https://github.com/llvm/llvm-project/pull/74147
More information about the llvm-commits
mailing list