[llvm] [X86] Enhance FABS/FNEG lowering for scalar _Float16 with bitwise operations (PR #128637)

via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 06:03:35 PST 2025


================
@@ -22313,7 +22344,7 @@ static SDValue LowerFABSorFNEG(SDValue Op, SelectionDAG &DAG) {
   // generate a 16-byte vector constant and logic op even for the scalar case.
   // Using a 16-byte mask allows folding the load of the mask with
   // the logic op, so it can save (~4 bytes) on code size.
-  bool IsFakeVector = !VT.isVector() && !IsF128;
+  bool IsFakeVector = !VT.isVector() && !IsF128 && VT != MVT::f16;
----------------
StarOne01 wrote:

Thanks! here is the new PR https://github.com/llvm/llvm-project/pull/128877.

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


More information about the llvm-commits mailing list