forked from mindspore-Ecosystem/mindspore
!16662 dont't eliminate cast when cast is input of return
From: @Margaret_wangrui Reviewed-by: @hwhewei,@zh_qh Signed-off-by: @hwhewei
This commit is contained in:
commit
70e6f84458
|
@ -470,8 +470,7 @@ bool IsNotRealUsedByOthers(const FuncGraphPtr &graph, const AnfNodePtr &node) {
|
|||
auto out_node = output.first;
|
||||
auto name = AnfAlgo::GetCNodeName(out_node);
|
||||
if (name == prim::kPrimDepend->name() || name == prim::kPrimMakeTuple->name() ||
|
||||
name == prim::kPrimTupleGetItem->name() || name == prim::kPrimLoad->name() ||
|
||||
name == prim::kPrimReturn->name()) {
|
||||
name == prim::kPrimTupleGetItem->name() || name == prim::kPrimLoad->name()) {
|
||||
auto result = IsNotRealUsedByOthers(graph, out_node);
|
||||
if (!result) {
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue