[llvm] [X86][NVPTX][LegalizeDAG] If i16 legal, legalize FABS.f16 with Expand (PR #106153)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 15:23:06 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);
----------------
Artem-B wrote:
X86 could use test cases for fneg/fcopysign.
https://github.com/llvm/llvm-project/pull/106153
More information about the llvm-commits
mailing list