This patch modifies the FCOPYSIGN lowering to go through the BSP
pseudo-instruction. This allows the same lowering code for NEON,
SVE and SVE2.
As part of this, lowering for BSP for SVE and SVE2 is also added.
For SVE and NEON this patch is NFC.
Paths
| Differential D118394
[AArch64][NEON][SVE] Lower FCOPYSIGN using AArch64ISD::BSP ClosedPublic Authored by DavidTruby on Jan 27 2022, 9:41 AM.
Details Summary This patch modifies the FCOPYSIGN lowering to go through the BSP As part of this, lowering for BSP for SVE and SVE2 is also added. For SVE and NEON this patch is NFC.
Diff Detail
Event TimelineDavidTruby added reviewers: peterwaller-arm, paulwalker-arm, bsmith, MattDevereau, sdesmalen.Jan 27 2022, 9:42 AM Comment Actions Apologies to reviewers for the confusion above, I believe this patch should now be correct in all the given cases. I also fear the intent here may be a bit vague so I should clarify: what I'm trying to do is unify the lowering of FCOPYSIGN for scalar, NEON, SVE and SVE2 cases by lowering it to the AArch64ISD::BSP pseudo-instruction, which should have correct lowering for each architecture.
Comment Actions Reorder the operands and flip bit mask.
Comment Actions Remove special f64 handling which was erroneous and no longer necessary after previous change. Comment Actions LGTM. I see the one additional instruction in the NOFP16 case which is an artefact of how the BSP node is defined, which is not changed in this patch. We've discussed it and attempted to remove it, but failed for now. This revision is now accepted and ready to land.Feb 3 2022, 6:14 AM This revision was landed with ongoing or failed builds.Feb 7 2022, 6:35 AM Closed by commit rGbe826cf4f71a: [AArch64][NEON][SVE] Lower FCOPYSIGN using AArch64ISD::BSP (authored by DavidTruby). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 406432 llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
llvm/lib/Target/AArch64/SVEInstrFormats.td
llvm/test/CodeGen/AArch64/arm64-fcopysign.ll
llvm/test/CodeGen/AArch64/f16-instructions.ll
llvm/test/CodeGen/AArch64/fcopysign.ll
llvm/test/CodeGen/AArch64/sve-fcopysign.ll
llvm/test/CodeGen/AArch64/sve2-fcopysign.ll
llvm/test/CodeGen/AArch64/vector-fcopysign.ll
|
Do we want to preserve this comment somewhere?