Page MenuHomePhabricator

[MIPS GlobalISel] NarrowScalar G_SMULH
Changes PlannedPublic

Authored by Petar.Avramovic on Mar 1 2019, 6:28 AM.

Details

Summary

NarrowScalar G_SMULH in LegalizerHelper using MultiplyRegisters helper function.
NarrowScalar G_SMULH for MIPS32.

Diff Detail

Event Timeline

Petar.Avramovic created this revision.Mar 1 2019, 6:28 AM
Petar.Avramovic planned changes to this revision.Mar 1 2019, 6:30 AM

We need to wait for NarrowScalar of G_SEXT and G_ZEXT and for perfecting artifact legalization
(since here it depends in which order we attempt to combine artifacts that are chained).

Could you rebase the patch?

Petar.Avramovic planned changes to this revision.Mar 11 2019, 5:08 AM
atanasyan added inline comments.Mar 11 2019, 8:29 AM
lib/Target/Mips/MipsInstructionSelector.cpp
161

Join declaration and initialization.

168–169

ditto

Addressed review comments.

Petar.Avramovic planned changes to this revision.Mar 12 2019, 9:00 AM

Needs a test. This may need the -gisel-abort=0 trick to hack around the artifact issues

I added this patch to show how we can handle G_SMULH in narrowScalarMul, will add the test in the future.