[spirv] Allow return ops to be in control flow ops
[spirv] Allow return ops to be in control flow ops

Use `getParentOfType<FunctionOp>()` instead of `cast<FuncOp>(getParentOp())`
to avoid crash when return ops are used inside spv.selection/spv.loop.

PiperOrigin-RevId: 273006041

aam-at/tensorflow,ppwwyyxx/tensorflow,jhseu/tensorflow,gautam1858/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,DavidNorman/tensorflow,sarvex/tensorflow,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,jhseu/tensorflow,arborh/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,aldian/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,karllessard/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,petewarden/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,xzturn/tensorflow,yongtang/tensorflow,aam-at/tensorflow,aam-at/tensorflow,petewarden/tensorflow,gunan/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,jhseu/tensorflow,karllessard/tensorflow,aam-at/tensorflow,xzturn/tensorflow,arborh/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,aam-at/tensorflow,aldian/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,gunan/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,gunan/tensorflow,paolodedios/tensorflow,sarvex/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,DavidNorman/tensorflow,ppwwyyxx/tensorflow,xzturn/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,annarev/tensorflow,aldian/tensorflow,annarev/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,tensorflow/tensorflow,aldian/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,renyi533/tensorflow,arborh/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,DavidNorman/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,yongtang/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,petewarden/tensorflow,xzturn/tensorflow,annarev/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,DavidNorman/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,arborh/tensorflow,annarev/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,arborh/tensorflow,karllessard/tensorflow,gunan/tensorflow,renyi533/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,Intel-tensorflow/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,gunan/tensorflow,DavidNorman/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,DavidNorman/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,annarev/tensorflow,xzturn/tensorflow,arborh/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,tensorflow/tensorflow,sarvex/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,petewarden/tensorflow,gunan/tensorflow,tensorflow/tensorflow,gunan/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,Intel-tensorflow/tensorflow,DavidNorman/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,sarvex/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,arborh/tensorflow,aam-at/tensorflow,annarev/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jhseu/tensorflow,gunan/tensorflow,davidzchen/tensorflow,arborh/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,ppwwyyxx/tensorflow,yongtang/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,aldian/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,yongtang/tensorflow,karllessard/tensorflow,xzturn/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,xzturn/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,renyi533/tensorflow,Intel-Corporation/tensorflow,adit-chandra/tensorflow,aldian/tensorflow,renyi533/tensorflow,tensorflow/tensorflow,arborh/tensorflow,xzturn/tensorflow