[llvm-branch-commits] [llvm] [RISCV] Attach VLMAX range attribute for vsetvli/vsetvlimax in InstCombine (PR #218652)
Pengcheng Wang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 25 23:46:42 PDT 2026
wangpc-pp wrote:
> Can we check what this callback is doing against the guidance here and the other targets: https://llvm.org/docs/InstCombineContributorGuide.html#canonicalization-and-target-independence
>
> It's not clear to me how much we can take subtarget features into account when doing these combines. AArch64 seems to take into account the presence or absence of streaming mode in their checks (`instCombineSMECntsd`), so maybe this is equally ok for us to take into account the vlmin from target features.
According to the guide:
> The use of TargetTransformInfo is only allowed for hooks for target-specific intrinsics, such as `TargetTransformInfo::instCombineIntrinsic()`. These are already inherently target-dependent anyway.
I think it should be OK since it is assumed to be target-dependent already? So that we can do whatever target-dependent like querying these subtarget features.
https://github.com/llvm/llvm-project/pull/218652
More information about the llvm-branch-commits
mailing list