HomePhabricator

[MIPS GlobalISel] Select MSA vector generic and builtin fabs

Authored by Petar.Avramovic on Oct 24 2019, 4:45 AM.

Description

[MIPS GlobalISel] Select MSA vector generic and builtin fabs

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 for
vector type (some targets generate vector llvm.fabs.* from 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.

Differential Revision: https://reviews.llvm.org/D69346