================
@@ -3752,6 +3752,58 @@ bool RISCVTTIImpl::shouldCopyAttributeWhenOutliningFrom(
std::optional<Instruction *>
RISCVTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
+ // Attach a range return attribute describing the result of
vsetvli/vsetvlimax
+ // so generic value analyses can reason about it. The verifier guarantees an
+ // XLen result and constant VSEW/VLMUL encoding a valid vtype, so no
defensive
+ // validation is needed here.
+ if (II.getIntrinsicID() == Intrinsic::riscv_vsetvli ||
+ II.getIntrinsicID() == Intrinsic::riscv_vsetvlimax) {
----------------
artagnon wrote:
```suggestion
if (Iis_contained{Intrinsic::riscv_vsetvli, Intrinsic::riscv_vsetvlimax},
II.getIntrinsicID()) {
```
https://github.com/llvm/llvm-project/pull/218652
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits