[llvm] [LV][TTI] Calculate cost of extracting last index in a scalable vector (PR #144086)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 08:00:05 PDT 2025
================
@@ -1465,14 +1465,21 @@ class TargetTransformInfo {
OperandValueInfo Op2Info = {OK_AnyValue, OP_None},
const Instruction *I = nullptr) const;
+ enum : int {
+ UnknownIndex = -1,
+ LastIndex = -2,
----------------
david-arm wrote:
Yeah I did wonder that myself. I just wasn't sure if `LastIndex` might also be convenient for callers to avoid calculating the last index for fixed-width vectors each time. I have no problem adding an assert if others agree?
https://github.com/llvm/llvm-project/pull/144086
More information about the llvm-commits
mailing list