Skip to content

Commit

Permalink
[X86] Enable v8f16/v16f16/v32f16 FCOPYSIGN custom lowering on SSE2/AV…
Browse files Browse the repository at this point in the history
…X/AVX512 targets
  • Loading branch information
RKSimon committed Nov 30, 2023
1 parent e653e03 commit 1d20b00
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 5,117 deletions.
3 changes: 3 additions & 0 deletions llvm/lib/Target/X86/X86ISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setOperationAction(ISD::FDIV, MVT::v8f16, Expand);
setOperationAction(ISD::FNEG, MVT::v8f16, Custom);
setOperationAction(ISD::FABS, MVT::v8f16, Custom);
setOperationAction(ISD::FCOPYSIGN, MVT::v8f16, Custom);

// Custom lower v2i64 and v2f64 selects.
setOperationAction(ISD::SELECT, MVT::v2f64, Custom);
Expand Down Expand Up @@ -1598,6 +1599,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setF16Action(MVT::v16f16, Expand);
setOperationAction(ISD::FNEG, MVT::v16f16, Custom);
setOperationAction(ISD::FABS, MVT::v16f16, Custom);
setOperationAction(ISD::FCOPYSIGN, MVT::v16f16, Custom);
setOperationAction(ISD::FADD, MVT::v16f16, Expand);
setOperationAction(ISD::FSUB, MVT::v16f16, Expand);
setOperationAction(ISD::FMUL, MVT::v16f16, Expand);
Expand Down Expand Up @@ -2056,6 +2058,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
}
setOperationAction(ISD::FNEG, MVT::v32f16, Custom);
setOperationAction(ISD::FABS, MVT::v32f16, Custom);
setOperationAction(ISD::FCOPYSIGN, MVT::v32f16, Custom);
}

// This block control legalization of v32i1/v64i1 which are available with
Expand Down
Loading

0 comments on commit 1d20b00

Please sign in to comment.