This is an archive of the discontinued LLVM Phabricator instance.

[GIsel][CombinerHelper] Fix for missed ElideBrByInvertingCond/CombineIndexedLoadStore combines [4/10]
ClosedPublic

Authored by vsk on Apr 15 2020, 4:35 PM.

Details

Summary

Fix an issue which could result in ElideBrByInvertingCond or
CombineIndexedLoadStore being missed when debug info is present. In both
cases the fix is s/hasOneUse/hasOneNonDbgUse/.

Diff Detail

Event Timeline

vsk created this revision.Apr 15 2020, 4:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2020, 4:35 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
aemerson added inline comments.Apr 15 2020, 5:43 PM
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
645

This looks like an unrelated fix?

vsk updated this revision to Diff 257926.Apr 15 2020, 6:16 PM
vsk retitled this revision from [CombinerHelper] Fix missed ElideBrByInvertingCond combine to [GIsel][CombinerHelper] Fix missed ElideBrByInvertingCond combine [4/10].
vsk edited the summary of this revision. (Show Details)

retitle

vsk planned changes to this revision.Apr 15 2020, 6:19 PM
vsk marked an inline comment as done.
vsk added inline comments.
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
645

Hm, you're right, I don't think it's exercised by the test change. I'll try to find some other way to exercise this.

vsk updated this revision to Diff 258180.Apr 16 2020, 2:48 PM
vsk retitled this revision from [GIsel][CombinerHelper] Fix missed ElideBrByInvertingCond combine [4/10] to [GIsel][CombinerHelper] Fix for missed ElideBrByInvertingCond/CombineIndexedLoadStore combines [4/10].
vsk edited the summary of this revision. (Show Details)

Add test coverage for change in findPreIndexCandidate. PTAL, thanks.

aemerson accepted this revision.Apr 16 2020, 5:12 PM

LGTM.

This revision is now accepted and ready to land.Apr 16 2020, 5:12 PM
This revision was automatically updated to reflect the committed changes.