This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Enable code selection using `s_mul_hi_u32`/`s_mul_hi_i32`.
ClosedPublic

Authored by hliao on Mar 18 2019, 11:19 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

hliao created this revision.Mar 18 2019, 11:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2019, 11:19 AM
rampitec added inline comments.Mar 18 2019, 11:23 AM
llvm/test/CodeGen/AMDGPU/mul.ll
143 ↗(On Diff #191131)

Don't you need to check for s_mul_lo as well here?

hliao marked an inline comment as done.Mar 18 2019, 11:30 AM
hliao added inline comments.
llvm/test/CodeGen/AMDGPU/mul.ll
143 ↗(On Diff #191131)

There is only 's_mul_i32' instead of s_mul_lo. `s_mul_i32' is already supported in the current code base.

arsenm added inline comments.Mar 18 2019, 11:52 AM
llvm/test/CodeGen/AMDGPU/mul.ll
143 ↗(On Diff #191131)

There is no _lo, it's the same. More checks are better though

hliao updated this revision to Diff 191140.Mar 18 2019, 12:11 PM

Update the test case following reviewers' comments.

rampitec added inline comments.Mar 18 2019, 1:08 PM
llvm/test/CodeGen/AMDGPU/mul.ll
143 ↗(On Diff #191131)

Right. I just assume it is a good idea we have low multiplication check anyway.

143 ↗(On Diff #191131)

The only thing I suggest is to use GFX9-DAG as they may be easily reordered.

hliao updated this revision to Diff 191161.Mar 18 2019, 1:28 PM

revise again

This revision is now accepted and ready to land.Mar 18 2019, 1:31 PM
This revision was automatically updated to reflect the committed changes.