Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Differential D108099 Diff 366547 llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
Show All 34 Lines | |||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | ||||
define i32* @external_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) { | define i32* @external_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) { | ||||
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind | ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind | ||||
; IS__TUNIT____-LABEL: define {{[^@]+}}@external_ret2_nrw | ; IS__TUNIT____-LABEL: define {{[^@]+}}@external_ret2_nrw | ||||
; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] { | ; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] { | ||||
; IS__TUNIT____-NEXT: entry: | ; IS__TUNIT____-NEXT: entry: | ||||
; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]] | ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]] | ||||
; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR2]] | ; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]] | ||||
; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR2]] | ; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR2]] | ||||
; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]] | ; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]] | ||||
; IS__TUNIT____-NEXT: ret i32* [[W0]] | ; IS__TUNIT____-NEXT: ret i32* [[W0]] | ||||
; | ; | ||||
; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind | ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind | ||||
; IS__CGSCC____-LABEL: define {{[^@]+}}@external_ret2_nrw | ; IS__CGSCC____-LABEL: define {{[^@]+}}@external_ret2_nrw | ||||
; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] { | ; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] { | ||||
; IS__CGSCC____-NEXT: entry: | ; IS__CGSCC____-NEXT: entry: | ||||
; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]] | ; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]] | ||||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
return: ; preds = %if.end, %if.then | return: ; preds = %if.end, %if.then | ||||
%retval.0 = phi i32* [ %call5, %if.end ], [ %n0, %if.then ] | %retval.0 = phi i32* [ %call5, %if.end ], [ %n0, %if.then ] | ||||
ret i32* %retval.0 | ret i32* %retval.0 | ||||
} | } | ||||
define internal i32* @internal_ret1_rrw(i32* %r0, i32* %r1, i32* %w0) { | define internal i32* @internal_ret1_rrw(i32* %r0, i32* %r1, i32* %w0) { | ||||
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind | ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind | ||||
; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_ret1_rrw | ; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_ret1_rrw | ||||
; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree [[R1:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] { | ; IS__TUNIT____-SAME: (i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0:%.*]], i32* nofree align 4 [[R1:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] { | ||||
; IS__TUNIT____-NEXT: entry: | ; IS__TUNIT____-NEXT: entry: | ||||
; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4 | ; IS__TUNIT____-NEXT: [[TMP0:%.*]] = load i32, i32* [[R0]], align 4 | ||||
; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 | ; IS__TUNIT____-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0 | ||||
; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] | ; IS__TUNIT____-NEXT: br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]] | ||||
; IS__TUNIT____: if.then: | ; IS__TUNIT____: if.then: | ||||
; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] | ; IS__TUNIT____-NEXT: br label [[RETURN:%.*]] | ||||
; IS__TUNIT____: if.end: | ; IS__TUNIT____: if.end: | ||||
; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] | ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32* @internal_ret1_rw(i32* nofree noundef nonnull align 4 dereferenceable(4) [[R0]], i32* nofree [[W0]]) #[[ATTR2]] | ||||
▲ Show 20 Lines • Show All 226 Lines • Show Last 20 Lines |