[llvm-dev] GISel using deprecated vector_extract for G_EXTRACT_VECTOR_ELT mapping

Björn Pettersson A via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 9 06:51:46 PST 2020


According to code comment the definition of vector_extract has
been deprecated for ~5 years (at least since Dec 11, 2015).

Seems like some targets still are using it, and even the GlobalISel
implementation is supporting this deprecated functionality by
adding a mapping between G_EXTRACT_VECTOR_ELT and vector_extract
in SlectionDAGCompat.td.

My target is not using the deprecated vector_extract, and it is using
the preferred extractelt definition instead in tablegen patterns.

The problem is that there is no similar mapping between
extractelt and G_EXTRACT_VECTOR_ELT.

Is it allowed to have several GINodeEquiv statements, mapping the
same GISel instruction to different SDNodes?

(i.e. would it be wrong to also add a mapping between
G_EXTRACT_VECTOR_ELT and extractelt)

Or should we stop using the deprecated nodes in GISel mappings?

(then I assume someone need to finalize the work of getting rid
of vector_extract, at least in targets that support GISel, but
after 5 years I think it is about time to either remove the
deprecated definition or replace the "deprecated" comment with
something that explains why we need both vector_extract and
extractelt)


PS. The above questions also apply to vector_insert vs insertelt.

/Björn


More information about the llvm-dev mailing list