Go through the common query and be explicit about the supported flush
type.
Details
Diff Detail
Event Timeline
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp | ||
---|---|---|
374 | Looks broken for double to me but I don't know what the options are |
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp | ||
---|---|---|
149–151 | Huh. I wonder why are we using isHalfTy for figuring out denormal mode. Considering that it seems to be FP32 that is the special case with an attribute of its own, it should've been IsSingleTy. Knowing whether it's fp16 or not only allows us to get correct mode for fp16, but not for the other types. | |
374 | Indeed. I do not understand why getDenormalMode appears to single out fp32 as a special case. |
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp | ||
---|---|---|
374 | Because turn on f32 flush is the option the languages actually expose. denormal-fp-math-f32 acts as an override to denormal-fp-math |
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp | ||
---|---|---|
374 | OK, then the code is (and has been) broken for 'double'. I do not think we want to override denormals mode for doubles using denormal-fp-math-f32. https://llvm.org/docs/LangRef.html says:
On a side note, I wonder if the denormals handling mode may need to grow a similar override for fp16, which also has .ftz instruction variants. |
llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp | ||
---|---|---|
374 | But do those imply a change in the default FP mode, or are they just operations that have flushing semantics in the default mode |
Huh. I wonder why are we using isHalfTy for figuring out denormal mode.
Considering that it seems to be FP32 that is the special case with an attribute of its own, it should've been IsSingleTy. Knowing whether it's fp16 or not only allows us to get correct mode for fp16, but not for the other types.