This is an archive of the discontinued LLVM Phabricator instance.

Test case for patches D52002 and D52707
AbandonedPublic

Authored by ayonam on Dec 16 2018, 8:26 AM.

Details

Summary

This is a test case for the patches D52002 and D52707. The test case is for widening a switch instruction when the maximum value of a switch expression can be computed statically and at least 70% of those values have been given as switch cases. In that case widening the switch to include all the possible values and redirecting the newly added values to the default block causes a 3% improvement in performance due to the elimination of the conditional branch at the top of the switch to check for the default values.

Diff Detail

Event Timeline

ayonam created this revision.Dec 16 2018, 8:26 AM
hans added a comment.Dec 18 2018, 2:53 AM

This is a step in the right direction, but I think it should be possible to come up with a more simple hand-written test.

ayonam abandoned this revision.Jan 13 2019, 9:14 PM

This test case has been subsumed in D52707