Skip to content

Commit 1d20b00

Browse files
committed
[X86] Enable v8f16/v16f16/v32f16 FCOPYSIGN custom lowering on SSE2/AVX/AVX512 targets
1 parent e653e03 commit 1d20b00

File tree

2 files changed

+187
-5117
lines changed

2 files changed

+187
-5117
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,6 +1137,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
11371137
setOperationAction(ISD::FDIV, MVT::v8f16, Expand);
11381138
setOperationAction(ISD::FNEG, MVT::v8f16, Custom);
11391139
setOperationAction(ISD::FABS, MVT::v8f16, Custom);
1140+
setOperationAction(ISD::FCOPYSIGN, MVT::v8f16, Custom);
11401141

11411142
// Custom lower v2i64 and v2f64 selects.
11421143
setOperationAction(ISD::SELECT, MVT::v2f64, Custom);
@@ -1598,6 +1599,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
15981599
setF16Action(MVT::v16f16, Expand);
15991600
setOperationAction(ISD::FNEG, MVT::v16f16, Custom);
16001601
setOperationAction(ISD::FABS, MVT::v16f16, Custom);
1602+
setOperationAction(ISD::FCOPYSIGN, MVT::v16f16, Custom);
16011603
setOperationAction(ISD::FADD, MVT::v16f16, Expand);
16021604
setOperationAction(ISD::FSUB, MVT::v16f16, Expand);
16031605
setOperationAction(ISD::FMUL, MVT::v16f16, Expand);
@@ -2056,6 +2058,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
20562058
}
20572059
setOperationAction(ISD::FNEG, MVT::v32f16, Custom);
20582060
setOperationAction(ISD::FABS, MVT::v32f16, Custom);
2061+
setOperationAction(ISD::FCOPYSIGN, MVT::v32f16, Custom);
20592062
}
20602063

20612064
// This block control legalization of v32i1/v64i1 which are available with

0 commit comments

Comments
 (0)