This is an archive of the discontinued LLVM Phabricator instance.

use riscv vsetvl to tailfolding Co-authored-by: lidawei lidawei.1226@bytedance.com
AbandonedPublic

Authored by lizhengxian.123 on Oct 24 2022, 1:09 AM.

Details

Summary

we found that llvm now doesn't support riscv vsetvl instruction to tail folding. we create a new cmdline option:

--prefer-predicate-over-epilogue=vlen-else-scalar-epilogue

which can do tali folding with riscv vsetvl instruction.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptOct 24 2022, 1:09 AM
lizhengxian.123 requested review of this revision.Oct 24 2022, 1:09 AM
nlopes added inline comments.Oct 24 2022, 1:27 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
9851

Please use PoisonValue whenever possible instead of undef. We are trying to remove undef from LLVM, and thus we would like to avoid any new use unless there's no alternative.
Thank you!

lizhengxian.123 abandoned this revision.Oct 24 2022, 2:09 AM