nikic wrote: Thanks for the report! I've reverted the change for now.
```llvm declare ptr @passthrough(ptr) define i16 @test() { %a = alloca i16, align 1 store i16 1, ptr %a, align 1 %call = call ptr @passthrough(ptr readnone captures(ret: address, provenance) %a) %v = load i16, ptr %call, align 1 ret i16 %v } ``` We correctly determine that `%a` is not captured, but because of that we miss the indirect access via the load. I believe the reason is that `isEscapeSource()` will report that this is an escape source, and thus cannot alias with a non-escaped pointer. However, if `captures(ret: address, provenance)` is used, this is not correct. isEscapeSource() already takes isIntrinsicReturningPointerAliasingArgumentWithoutCapturing() into account for essentially the same reason. https://github.com/llvm/llvm-project/pull/125880 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits