This is an archive of the discontinued LLVM Phabricator instance.

[ConstraintElimination] Add tests to check for type bounds optimisation from zext instructions
Needs ReviewPublic

Authored by zjaffal on Feb 26 2023, 10:59 PM.

Details

Reviewers
fhahn
nikic
spatel
Summary

Currently we don't utilize the information that if we have a zext operation we can put an upperbound limit to the value if we know that the zext operand is not used in any sign-extended operation

Diff Detail

Event Timeline

zjaffal created this revision.Feb 26 2023, 10:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 26 2023, 10:59 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
zjaffal requested review of this revision.Feb 26 2023, 10:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 26 2023, 10:59 PM
zjaffal updated this revision to Diff 500795.Feb 27 2023, 8:01 AM

Add additional tests where we don't have the inital condition for the function argument. The entry check is
unecessary because the typebounds can be optimised if the constraint system already contained the function
arguemnts.

fhahn added inline comments.Apr 21 2023, 1:45 AM
llvm/test/Transforms/ConstraintElimination/type-bounds.ll
61

it's simpler to just return an i1 instead, this also makes verification easier.

183

nit: newline above.

326

could you also add a variant where we compare to a constant less than 255? And larger than 255?

zjaffal updated this revision to Diff 516806.Apr 25 2023, 7:57 AM

Remove redundant tests and simplify tests