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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 03:08:15 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
----------------
nikic wrote:

```suggestion
; The recurrence for the GEP offset can't produce poison so the freeze should be
```
This will satisfy the checker and if more accurate. GEP will never produce undef, only poison. And on that note, you'll probably also want a test that *can* produce poison, by adding inbounds/nuw on the GEP.

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


More information about the llvm-commits mailing list