[llvm] [VPlan] Expand AddRecs in VPSCEVExpander (PR #209921)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 29 05:02:57 PDT 2026


artagnon wrote:

> > It seems to be due to stuff like this, which would be fixed with the recent commit I think (to verify):
> 
> It looks like the latest run still includes some size increases, not sure if they are the same as before?

No, it's different this time:

```diff
-	maxu	a4, a3, s4
-	sub	a4, a4, a3
-	snez	a3, a4
-	sub	a4, a4, a3
-	divu	a4, a4, a2
+	neg	a4, a3
+	addi	a5, a3, 6
+	maxu	a5, a5, s5
+	sub	a4, s7, a4
+	sub	a3, s4, a3
+	xor	a4, a4, a5
+	add	a3, a3, a5
+	snez	a4, a4
+	sub	a3, a3, a4
+	divu	a3, a3, a2
```

I guess it's due to some missing folds? VPSCEVExpander doesn't try to optimize the output like SCEVExpander does?

https://github.com/llvm/llvm-project/pull/209921


More information about the llvm-commits mailing list