5252// CHECK-DAG: xnext1#0 <-> xnext2#0: MayAlias
5353// CHECK-DAG: xnext1.fir#0 <-> xnext2.fir#0: MayAlias
5454
55- // TODO: These should be NoAlias. However, AliasAnalysis currently
56- // indiscriminately treats all pointers as aliasing. That makes sense for the
57- // addresses within the pointers but not necessarily for the addresses of the
58- // pointers.
59- // CHECK-DAG: xnext1#0 <-> ynext#0: MayAlias
60- // CHECK-DAG: xnext1.fir#0 <-> ynext.fir#0: MayAlias
55+ // CHECK-DAG: xnext1#0 <-> ynext#0: NoAlias
56+ // CHECK-DAG: xnext1.fir#0 <-> ynext.fir#0: NoAlias
6157
6258func.func @_QMmPfoo(%arg0: !fir.ref<!fir.type<_QMmTt{next:!fir.box<!fir.ptr<!fir.type<_QMmTt>>>,i:i32}>> {fir.bindc_name = "x"}, %arg1: !fir.ref<!fir.type<_QMmTt{next:!fir.box<!fir.ptr<!fir.type<_QMmTt>>>,i:i32}>> {fir.bindc_name = "y"}) {
6359 %0 = fir.alloca i32 {bindc_name = "i1", uniq_name = "_QMmFfooEi1"}
@@ -391,16 +387,11 @@ func.func @_QMmPtest.fir() {
391387
392388// Check when composite is a local and thus cannot alias a dummy arg.
393389//
394- // TODO: The argp vs. loc%p cases should be NoAlias. However, AliasAnalysis
395- // currently indiscriminately treats all pointers as aliasing. That makes sense
396- // for the addresses within the pointers but not necessarily for the addresses
397- // of the pointers here.
398- //
399390// CHECK-DAG: argp#0 <-> loc#0: NoAlias
400- // CHECK-DAG: argp#0 <-> loc%p#0: MayAlias
391+ // CHECK-DAG: argp#0 <-> loc%p#0: NoAlias
401392// CHECK-DAG: argp#0 <-> loc%i#0: NoAlias
402393// CHECK-DAG: argp.fir#0 <-> loc.fir#0: NoAlias
403- // CHECK-DAG: argp.fir#0 <-> loc%p.fir#0: MayAlias
394+ // CHECK-DAG: argp.fir#0 <-> loc%p.fir#0: NoAlias
404395// CHECK-DAG: argp.fir#0 <-> loc%i.fir#0: NoAlias
405396//
406397// CHECK-DAG: argp.tgt#0 <-> loc#0: NoAlias
@@ -519,13 +510,10 @@ func.func @_QMmPtest.fir(%arg0: !fir.ref<!fir.box<!fir.ptr<i32>>> {fir.bindc_nam
519510// CHECK-DAG: argp.tgt.fir#0 <-> arg%p.fir#0: MayAlias
520511// CHECK-DAG: argp.tgt.fir#0 <-> arg%i.fir#0: MayAlias
521512//
522- // TODO: Shouldn't the arga vs. arg%p cases be NoAlias? However, arga is
523- // treated like a target because it's HostAssoc and arg is Argument, and arg%p
524- // is treated like a pointer.
525513// CHECK-DAG: arga#0 <-> arg#0: NoAlias
526- // CHECK-DAG: arga#0 <-> arg%p#0: MayAlias
514+ // CHECK-DAG: arga#0 <-> arg%p#0: NoAlias
527515// CHECK-DAG: arga.fir#0 <-> arg.fir#0: NoAlias
528- // CHECK-DAG: arga.fir#0 <-> arg%p.fir#0: MayAlias
516+ // CHECK-DAG: arga.fir#0 <-> arg%p.fir#0: NoAlias
529517
530518// Check when composite is a global.
531519//
@@ -552,16 +540,11 @@ func.func @_QMmPtest.fir(%arg0: !fir.ref<!fir.box<!fir.ptr<i32>>> {fir.bindc_nam
552540
553541// Check when composite is a local and thus cannot alias a dummy arg.
554542//
555- // TODO: The argp vs. loc%p case should be NoAlias. However, AliasAnalysis
556- // currently indiscriminately treats all pointers as aliasing. That makes sense
557- // for the addresses within the pointers but not necessarily for the addresses
558- // of the pointers here.
559- //
560543// CHECK-DAG: argp#0 <-> loc#0: NoAlias
561- // CHECK-DAG: argp#0 <-> loc%p#0: MayAlias
544+ // CHECK-DAG: argp#0 <-> loc%p#0: NoAlias
562545// CHECK-DAG: argp#0 <-> loc%i#0: NoAlias
563546// CHECK-DAG: argp.fir#0 <-> loc.fir#0: NoAlias
564- // CHECK-DAG: argp.fir#0 <-> loc%p.fir#0: MayAlias
547+ // CHECK-DAG: argp.fir#0 <-> loc%p.fir#0: NoAlias
565548// CHECK-DAG: argp.fir#0 <-> loc%i.fir#0: NoAlias
566549//
567550// TODO: Shouldn't these be NoAlias? However, argp.tgt is currently handled as
0 commit comments