[llvm] [AMDGPU] Make fneg/fabs/copysign legal for bf16 (PR #91676)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 22:54:51 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 {
----------------
arsenm wrote:
I've been meaning to remove the check in that case, instcombine now does that
https://github.com/llvm/llvm-project/pull/91676
More information about the llvm-commits
mailing list