[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:56:24 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:

Do any of the bfloat instructions have source modifiers? 

https://github.com/llvm/llvm-project/pull/91676


More information about the llvm-commits mailing list