This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][NFC] Add test for different LMULs in vectorizer
ClosedPublic

Authored by luke on Feb 10 2023, 3:31 AM.

Details

Summary

This is a test for an upcoming patch that proposes to change the default LMUL used by the loop vectorizer from 1 to 2

Diff Detail

Event Timeline

luke created this revision.Feb 10 2023, 3:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 10 2023, 3:31 AM
luke requested review of this revision.Feb 10 2023, 3:31 AM
reames accepted this revision.Feb 14 2023, 8:32 AM

LGTM w/comment addressed.

llvm/test/Transforms/LoopVectorize/RISCV/lmul.ll
3

I think this would be more clear to drop the DEFAULT and simply have the default configuration use an LMUL1 check line. Then when we switch the default, we simply change that to LMUL2.

117

Ok, there's something surprising going on here. When we go from LMUL1 to LMUL2, we appear to be *both* doubling the vector length (expected), and doing additional unrolling (unexpected). This means that the effective VF of the loop increases not by 2, but by 4.

I think we need to figure out what's causing the unrolling and isolate that. We should be changing one thing at a time here, not two.

This revision is now accepted and ready to land.Feb 14 2023, 8:32 AM
luke updated this revision to Diff 498962.Feb 20 2023, 2:37 PM

Address comments

luke marked an inline comment as done.Feb 20 2023, 2:40 PM
This revision was landed with ongoing or failed builds.Feb 20 2023, 2:40 PM
This revision was automatically updated to reflect the committed changes.