Page MenuHomePhabricator

[MIPS GlobalISel] Select MSA vector generic and builtin fabs
ClosedPublic

Authored by Petar.Avramovic on Oct 23 2019, 9:42 AM.

Details

Summary

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.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 23 2019, 9:42 AM
This revision is now accepted and ready to land.Oct 24 2019, 2:38 AM
Petar.Avramovic edited the summary of this revision. (Show Details)

Fix names of test files, be more specific in summary about llvm.fabs.* type since MIPS can generate scalar llvm.fabs.* but cannot generate vector llvm.fabs.*.

This revision was automatically updated to reflect the committed changes.