This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Insert VSETVLI at the end of a basic block if we didn't produce BlockInfo.Exit.
ClosedPublic

Authored by craig.topper on Feb 10 2022, 9:48 PM.

Details

Summary

This is an alternative to D118667 that instead of fixing the store
to match phase 1, it tries to detect the mismatch with the expected
value at the end of the block. This inserts a vsetvli after the vse
to satisfy the requirement of the other basic block.

We still have serious design issues in the pass, that is going to
require some rethinking.

We definitely need something for the LLVM 14 branch as the previous
fix introduced a worse bug.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 10 2022, 9:48 PM
craig.topper requested review of this revision.Feb 10 2022, 9:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2022, 9:48 PM
frasercrmck accepted this revision.Feb 11 2022, 8:24 AM

LGTM, at least in the short term. We definitely need to revisit this pass though.

Can we get this set of patches into LLVM 14, do you think?

This revision is now accepted and ready to land.Feb 11 2022, 8:24 AM
This revision was landed with ongoing or failed builds.Feb 11 2022, 9:35 AM
This revision was automatically updated to reflect the committed changes.