================
@@ -774,7 +774,7 @@ define i1 @captureICmpRev(ptr %x) {
define i1 @nocaptureInboundsGEPICmp(ptr %x) {
; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind
willreturn memory(none)
; FNATTRS-LABEL: define i1 @nocaptureInboundsGEPICmp
-; FNATTRS-SAME: (ptr readnone [[X:%.*]]) #[[ATTR0]] {
+; FNATTRS-SAME: (ptr readnone captures(address_is_null) [[X:%.*]]) #[[ATTR0]] {
----------------
goldsteinn wrote:
Is this correct? I get that the `cmp` is somewhat ill-formed (`false`), but I
don't see how this ever reduces to an `%x == null` check with a non-zero offset.
Also seems to also apply `address_is_null` w.o `inbounds`:
```
define i1 @nocaptureInboundsGEPICmp(ptr %x, i64 %y) {
%1 = getelementptr i8, ptr %x, i64 %y
%2 = icmp eq ptr %1, null
ret i1 %2
}
```
=>
```
define i1 @nocaptureInboundsGEPICmp(ptr readnone captures(address_is_null) %x,
i64 %y) {
%1 = getelementptr i8, ptr %x, i64 %y
%2 = icmp eq ptr %1, null
ret i1 %2
}
```
How is that correct?
https://github.com/llvm/llvm-project/pull/125880
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits