Skip to content

Commit 30e8dcd

Browse files
authored
Enable customer lowering for fabs_v16f16 with AVX2 (llvm#72914)
This is part-2 change to improve codegen for vec_fabs. In this patch, v16f16 and v132f16 fabs are improved. There will be at least two followups patches after this one. 1) fixing the ISEL crash when fabs.v32f16 uses custom lowering with AVX512 2) better expansion for v16f16, v32f16 types on AVX1 subtargets.
1 parent d506aa4 commit 30e8dcd

File tree

2 files changed

+25
-1725
lines changed

2 files changed

+25
-1725
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,6 +1596,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
15961596
setOperationAction(ISD::STORE, VT, Custom);
15971597
}
15981598
setF16Action(MVT::v16f16, Expand);
1599+
if (Subtarget.hasAVX2())
1600+
setOperationAction(ISD::FABS, MVT::v16f16, Custom);
15991601
setOperationAction(ISD::FADD, MVT::v16f16, Expand);
16001602
setOperationAction(ISD::FSUB, MVT::v16f16, Expand);
16011603
setOperationAction(ISD::FMUL, MVT::v16f16, Expand);

0 commit comments

Comments
 (0)