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.
Paths
| Differential D136583
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
Revision Contents
Diff 470077 llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
llvm/test/Transforms/LoopVectorize/RISCV/prefer_tail_folding_with_vsetvl.ll
|
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!