This is an archive of the discontinued LLVM Phabricator instance.

llvm-reduce: avoid duplicating switch cases
ClosedPublic

Authored by regehr on Aug 3 2022, 8:36 AM.

Details

Reviewers
aeubanks
arsenm
Summary

we sometimes create invalid IR modules by turning a switch case into, for example, 0, when there's already a zero in there somewhere, leading to invalid IR -- this patch helps llvm-reduce avoid doing that

Diff Detail

Event Timeline

regehr created this revision.Aug 3 2022, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2022, 8:36 AM
regehr requested review of this revision.Aug 3 2022, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2022, 8:36 AM
arsenm accepted this revision.Aug 3 2022, 8:37 AM

LGTM, thanks this one has been bothering me

This revision is now accepted and ready to land.Aug 3 2022, 8:37 AM
arsenm added inline comments.Aug 3 2022, 8:38 AM
llvm/test/tools/llvm-reduce/no-duplicate-switch-case.ll
5

Should also add a run line testing operands-one

regehr updated this revision to Diff 449676.Aug 3 2022, 9:03 AM

address comment by Matt

regehr marked an inline comment as done.Aug 3 2022, 9:03 AM