    Avoid dyn_cast to ShapedType
    Avoid dyn_cast to ShapedType

    ShapedType just indicates shape/rank/element semantics. It's generally not useful for other type checking. This check already checks for vector or tensor type, so we can use a direct cast if we check those first.

    Related to making MemRefType a subclass of ShapedType

--

PiperOrigin-RevId: 250583231

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