[llvm] [BasicAA] Treat IntToPtr(Argument) similarly to Argument in relation to function-local objects. (PR #134505)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 7 13:47:01 PDT 2025


================
@@ -24,21 +24,21 @@ define void @test2(i64 %Q_as_int) {
   ret void
 }
 
-; Verify that escaped noalias parameter may alias inttoptr
+; Verify that escaped noalias parameter are no alias inttoptr
 define void @test3(ptr noalias %P, i64 %Q_as_int) {
   ; CHECK-LABEL: Function: test3:
-  ; CHECK: MayAlias:	i8* %P, i8* %Q
+  ; CHECK: NoAlias:	i8* %P, i8* %Q
----------------
nikic wrote:

So you are suggesting that for a `noalias` pointer `%P`, doing `store inttoptr(ptrtoint(%P))` would be UB? I don't think that is viable due to frontend requirements.

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


More information about the llvm-commits mailing list