This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Skip additional folding on the same operand.
ClosedPublic

Authored by hliao on Oct 23 2019, 1:12 PM.

Diff Detail

Event Timeline

hliao created this revision.Oct 23 2019, 1:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 23 2019, 1:12 PM
hliao added a comment.Oct 23 2019, 1:14 PM

This patch fixes a crash, which is caused by the same instruction is added as a candidate twice after commuting.

A mir test would be better.

hliao updated this revision to Diff 226181.Oct 23 2019, 2:04 PM

add mir test

rampitec added inline comments.Oct 23 2019, 2:15 PM
llvm/test/CodeGen/AMDGPU/fold-imm-copy.mir
28

Can you please a full check, what kind of folding you are expecting here? I.e. operands for both instructions.

hliao updated this revision to Diff 226254.Oct 24 2019, 7:10 AM

revise again

This revision is now accepted and ready to land.Oct 24 2019, 7:59 AM
This revision was automatically updated to reflect the committed changes.