This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Disable interleaving scalar loops in the loop vectorizer.
ClosedPublic

Authored by craig.topper on Dec 17 2021, 3:06 PM.

Details

Summary

The loop vectorize can interleave scalar loops even if it doesn't
vectorize them. I don't believe we inteded to enable this when
we enabled interleaving for vector instructions.

Disable interleaving for VF=1 like X86 and AMDGPU already do. Test
lifted from AMDGPU.

Diff Detail

Event Timeline

craig.topper created this revision.Dec 17 2021, 3:06 PM
craig.topper requested review of this revision.Dec 17 2021, 3:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2021, 3:06 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
luismarques accepted this revision.Dec 22 2021, 8:07 AM

LGTM.

llvm/test/Transforms/LoopVectorize/RISCV/unroll-in-loop-vectorizer.ll
2

Remove this.

39

?

This revision is now accepted and ready to land.Dec 22 2021, 8:07 AM
craig.topper added inline comments.Dec 22 2021, 8:18 AM
llvm/test/Transforms/LoopVectorize/RISCV/unroll-in-loop-vectorizer.ll
2

Why?

39

Must have been in the AMDGPU test. I’ll remove.

luismarques added inline comments.Dec 22 2021, 9:59 AM
llvm/test/Transforms/LoopVectorize/RISCV/unroll-in-loop-vectorizer.ll
2

The CHECKs for small_loop may have originally been generated by utils/update_test_checks.py but they are now manually written and that tool won't now update the test automatically. Isn't it misleading to keep that note?

craig.topper added inline comments.Dec 22 2021, 11:23 AM
llvm/test/Transforms/LoopVectorize/RISCV/unroll-in-loop-vectorizer.ll
2

Pretty sure I ran the script. AMDGPU had a couple manually written lines

This revision was landed with ongoing or failed builds.Dec 23 2021, 6:38 AM
This revision was automatically updated to reflect the committed changes.