[llvm] [AMDGPU] Make fneg/fabs/copysign legal for bf16 (PR #91676)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 20:32:54 PDT 2024
================
@@ -946,14 +946,14 @@ bool AMDGPUTargetLowering::isFAbsFree(EVT VT) const {
// Packed operations do not have a fabs modifier.
return VT == MVT::f32 || VT == MVT::f64 ||
- (Subtarget->has16BitInsts() && VT == MVT::f16);
+ (Subtarget->has16BitInsts() && (VT == MVT::f16 || VT == MVT::bf16));
}
bool AMDGPUTargetLowering::isFNegFree(EVT VT) const {
----------------
rampitec wrote:
It practically means SDag will not try to replace with with bit operation and live it for selection.
https://github.com/llvm/llvm-project/pull/91676
More information about the llvm-commits
mailing list