[llvm] [X86][NVPTX][LegalizeDAG] If i16 legal, legalize FABS.f16 with Expand (PR #106153)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 15:53:07 PDT 2024
================
@@ -672,6 +672,11 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
// Half type will be promoted by default.
setF16Action(MVT::f16, Promote);
+ // Expand instead of Promote to clear/flip/copy sign bit by bitcasting to
+ // i16.
+ setOperationAction(ISD::FABS, MVT::f16, Expand);
+ setOperationAction(ISD::FNEG, MVT::f16, Expand);
----------------
v01dXYZ wrote:
Thanks !
https://github.com/llvm/llvm-project/pull/106153
More information about the llvm-commits
mailing list