This is an archive of the discontinued LLVM Phabricator instance.

[LAA] Add test that shows MaxSafeDepDistBytes is incorrect. NFC.
ClosedPublic

Authored by michaelmaitland on Jun 29 2023, 5:45 PM.

Details

Summary

This precommit patch shows MaxSafeDepBytesDist is 24 when it should
be 8.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 5:45 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
michaelmaitland requested review of this revision.Jun 29 2023, 5:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2023, 5:45 PM
ABataev added inline comments.Jun 30 2023, 4:57 AM
llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll
11–58

Could you try to remove not necessary param attributes and simplify names of basic blocks, vars, etc.?

michaelmaitland marked an inline comment as done.

Remove not necessary param attributes and simplify names of basic blocks, vars, etc.

fhahn added inline comments.Jun 30 2023, 7:29 AM
llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll
29

is this needed?

30

simpler to pass %len as i64

33

nit: can simply be loop

34

nit: strip indvars.

35

maybe easier to read if this would be %iv.4, same for the other increments

50

nit: can simply be exit

michaelmaitland marked 5 inline comments as done.

Cleanup test some more

llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll
29

What do you have in mind to guard entrance into loop when len <= 0?

fhahn added a comment.Jul 3 2023, 2:48 PM

Thanks for the updates! It looks like the check lines may need updating ,as the test appears to fail in precommit CI?

llvm/test/Analysis/LoopAccessAnalysis/max_safe_dep_dist_non_unit_stride.ll
29

I think the guard is not needed?

michaelmaitland marked 2 inline comments as done.

Remove guard, fix check statements

fhahn accepted this revision.Jul 6 2023, 2:19 PM

LGTM, thanks!

This revision is now accepted and ready to land.Jul 6 2023, 2:19 PM
This revision was landed with ongoing or failed builds.Jul 6 2023, 2:37 PM
This revision was automatically updated to reflect the committed changes.