[PATCH] D69346: [MIPS GlobalISel] Select MSA vector generic and builtin fabs
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 23 09:46:52 PDT 2019
Petar.Avramovic created this revision.
Petar.Avramovic added reviewers: atanasyan, petarj.
Herald added subscribers: llvm-commits, jrtc27, hiraditya, arichardson, rovka, sdardis.
Herald added a project: LLVM.
selectImpl is able to select G_FABS when we set bank for
vector operands to fprb. Add detailed tests.
Note: G_FABS is generated from llvm-ir intrinsics ‘llvm.fabs.*’,
and at the moment MIPS is not able to generate this intrinsic (some
targets generate ‘llvm.fabs.*’ form calls to a builtin function).
We can handle fabs using __builtin_msa_fmax_a_<format> and passing
same vector as both arguments. __builtin_msa_fmax_a_<format> will
be directly selected into FMAX_A_<format> in legalizeIntrinsic.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69346
Files:
llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp
llvm/test/CodeGen/Mips/GlobalISel/instruction-select/fabs_vec.mir
llvm/test/CodeGen/Mips/GlobalISel/legalizer/fabs_vec.mir
llvm/test/CodeGen/Mips/GlobalISel/legalizer/fabs_vec_intrinsic.mir
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/fabs_vec.ll
llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/fabs_vec_intrinsic.ll
llvm/test/CodeGen/Mips/GlobalISel/regbankselect/fabs_vec.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69346.226157.patch
Type: text/x-patch
Size: 14404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191023/9803fc6f/attachment.bin>
More information about the llvm-commits
mailing list