================
@@ -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]] {
----------------
nikic wrote:
I've pushed a fix for this. I'm not passing the Base object to
DetermineUseCaptureKind. We can only infer address_is_null if we're comparison
the base to null.
It *is* okay to look through inbounds GEPs though, because they preserve
nullness. Though InstCombine should optimize away such GEPs anyway, so maybe
it's not necessary to explicitly handle here...
https://github.com/llvm/llvm-project/pull/125880
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits