[PATCH] D108725: [AArch64][GlobalISel] Implement custom legalization for s32/s64 G_FCOPYSIGN
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 25 13:28:07 PDT 2021
paquette created this revision.
paquette added reviewers: aemerson, jroelofs.
Herald added subscribers: hiraditya, kristof.beyls, rovka.
paquette requested review of this revision.
Herald added a project: LLVM.
This is intended to be equivalent to the s32 + s64 cases in `AArch64TargetLowering::LowerFCOPYSIGN`.
Widen everything and then use G_BIT + a mask to handle the actual copysign operation. Then, narrow back down to s32/s64.
I wasn't sure about what the best/most canonical INSERT_SUBREG-selectable pattern is. I chose G_INSERT_VECTOR_ELT + an undef vector because it produces reasonably okay codegen. (It doesn't produce INSERT_SUBREG right now though.) If there's a better way to do this then I'm happy to change it.
We also have a couple codegen deficiencies with how we emit vector constants right now. (We need a GISel equivalent to the `tryAdvSIMDModImm64` stuff)
https://reviews.llvm.org/D108725
Files:
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
llvm/test/CodeGen/AArch64/GlobalISel/legalize-fcopysign.mir
llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108725.368713.patch
Type: text/x-patch
Size: 7631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210825/a438b0fa/attachment.bin>
More information about the llvm-commits
mailing list