[llvm] [VPlan] Wrap SCEVAddRecExprs in VPExpandSCEVRecipe in VPSCEVExpander. (PR #210013)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 01:56:32 PDT 2026


================
@@ -0,0 +1,346 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --version 6
+; RUN: opt -passes=loop-vectorize -force-vector-width=4 -S %s | FileCheck %s
+
+declare i32 @cond()
+
+; FIXME: ptrtoaddr(%bound) should only be expanded once; see the two
+; ptrtoaddr instructions in the CHECK block below.
+define i32 @ptrtoaddr_expanded_twice(ptr %bound, ptr %dst) {
----------------
fhahn wrote:

Just for awareness, I added a few additional tests for small missed CSE opportunities in the middle-end, because memory runtime checks are still expanded by the IR-based expander. I'll soon share a patch to also move that over.

I think the changes in https://github.com/llvm/llvm-project/pull/209921 probably have the same root cause

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


More information about the llvm-commits mailing list