This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Optimze old value of v_mov_b32_dpp
ClosedPublic

Authored by rampitec on May 8 2018, 12:01 PM.

Details

Summary

We can eliminate old value if bound_ctrl = 1 and row_mask = bank_mask = 0xf.
This is alternative implementation working with the intrinsic in InstCombine.
Original review for past-ISel optimization: D46570.

Diff Detail

Repository
rL LLVM

Event Timeline

rampitec created this revision.May 8 2018, 12:01 PM
arsenm added inline comments.May 18 2018, 1:05 AM
lib/Transforms/InstCombine/InstCombineCalls.cpp
3480–3482 ↗(On Diff #145754)

I would prefer to use checked dyn_casts here rather than crash on invalid intrinsic uses

test/CodeGen/AMDGPU/llvm.amdgcn.update.dpp.ll
2–3 ↗(On Diff #145754)

These should go in the test/InstCombine/AMDGPU/amdgcn-intrinsics.ll

rampitec updated this revision to Diff 147634.May 18 2018, 6:51 PM
rampitec marked 2 inline comments as done.
arsenm accepted this revision.May 21 2018, 11:23 PM

LGTM

This revision is now accepted and ready to land.May 21 2018, 11:23 PM
This revision was automatically updated to reflect the committed changes.