This simplifies the code a bit, suggested in D124718.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Move code to optimize truncates before scalar VF check. Test to check this added in 0c000d77ad09665a0debeb.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
8584 | Good point, kept the code before checking for scalar VFs. I also added a test in 419e49621fb4. | |
8599 | Yep, even though it doesn't explicitly check for scalar VFs. |
Thanks for following up!
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | ||
---|---|---|
8574 | Unrelated nits while we're here: above could benefit slightly from condition reversal, below needs its indentation fixed. | |
8587–8598 | Would be good to add a comment stating that all other "Widen" recipes from here on deal only with VF>1. |
Unrelated nits while we're here: above could benefit slightly from condition reversal, below needs its indentation fixed.