This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Allow compatible VTYPE in AVL Reg Forward cases
ClosedPublic

Authored by reames on May 25 2022, 11:05 AM.

Details

Summary

During insertion of VSETVLI, we have two related bits of code which decide whether we can reuse a previous vsetvli result. As was pointed out in the original review, these cases can allow any prior state for which we know that VL is the same for any value of AVL.

This was originally separated out of a desire for separate tests and review. As it turns out, finding a test case for this has been quite challenging. Most of the cases I tried, we manage to already get through other chains of logic. We do have one correct test change, but that only exercises one of the two changes.

Diff Detail

Event Timeline

reames created this revision.May 25 2022, 11:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 11:05 AM
reames requested review of this revision.May 25 2022, 11:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 11:05 AM
frasercrmck accepted this revision.May 26 2022, 7:27 AM

LGTM

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
723

VLMAXE -> VLMAX

1243

Maybe make this vlmax upper case for consistency while you're here?

This revision is now accepted and ready to land.May 26 2022, 7:27 AM
This revision was landed with ongoing or failed builds.May 26 2022, 8:50 AM
This revision was automatically updated to reflect the committed changes.