This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32.
ClosedPublic

Authored by alex-t on Sep 3 2018, 4:32 AM.

Details

Reviewers
rampitec
Summary

Fold immediate move as inline constant to the user instruction in case there is a single use.
Code for inlining Src0 and Src1 has the most in common. I did not place common part to the function for the sake of readability.

Tests: CodeGen/AMDGPU - passed
new MIR test added

Diff Detail

Event Timeline

alex-t created this revision.Sep 3 2018, 4:32 AM
arsenm added a comment.Sep 3 2018, 8:22 AM

Add another case where the register is physical, I think this will assert as is

lib/Target/AMDGPU/SIInstrInfo.cpp
2071–2073

Comment indentation is wrong

2080–2081

Formatting

2086

Indentation

alex-t updated this revision to Diff 163783.Sep 4 2018, 4:35 AM

Formatting corrected.

alex-t updated this revision to Diff 164154.Sep 6 2018, 12:58 AM
alex-t retitled this revision from [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline move immediate. to [AMDGPU] Preliminary patch for divergence driven instruction selection. Inline immediate move to V_MADAK_F32..
alex-t marked 3 inline comments as done.

Physical registers handling added. Test cases for physical registers added.

This revision is now accepted and ready to land.Sep 6 2018, 11:47 AM
alex-t closed this revision.Sep 13 2018, 5:52 AM