[llvm] [InstCombine] Add test for freeze of GEP with recurrence offset (NFC) (PR #145541)

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 03:45:55 PDT 2025


================
@@ -877,6 +877,39 @@ exit:                                             ; preds = %loop
   ret void
 }
 
+; The recurrence for the GEP offset can't produce undef so the freeze should be
----------------
c-rhodes wrote:

I've changed it to poison. For the other test, inbounds/nuw on the GEP is dropped and the freeze pushed thru: https://godbolt.org/z/r7aWf5nqq, unless `noundef` is removed from `%n`: https://godbolt.org/z/8j4Gx64o9. I can add a test for this.

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


More information about the llvm-commits mailing list