[all-commits] [llvm/llvm-project] a498e6: [LV] Cost EVL width-adjusting zext/trunc as free (...
Pengcheng Wang via All-commits
all-commits at lists.llvm.org
Thu Sep 24 01:08:44 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a498e642af4aded70fd48bda68b0692a58425e86
https://github.com/llvm/llvm-project/commit/a498e642af4aded70fd48bda68b0692a58425e86
Author: Pengcheng Wang <wangpengcheng.pp at bytedance.com>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
M llvm/test/Transforms/LoopVectorize/RISCV/force-vect-msg.ll
M llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-cost.ll
Log Message:
-----------
[LV] Cost EVL width-adjusting zext/trunc as free (#225016)
With EVL tail folding, the scalar zext/trunc that adjusts the i32
ExplicitVectorLength to the canonical IV type was priced as a regular
cast (cost 1). It never lowers to an instruction, only feeding the
(free) IV increment and AVL decrement, so the phantom cost dropped
borderline loops such as TSVC s351 on RV64 to VF 1.
Here we return 0 for such casts so that we don't over-estimate the
cost.
Fixes #224987
Assisted-by: TRAE CLI (Opus 4.8)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list