[PATCH] D59325: [GlobalISel][AArch64] Add partial selection support for G_INSERT_VECTOR_ELT

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 16:45:35 PDT 2019


aemerson added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp:455
+      .legalIf([=](const LegalityQuery &Query) {
+        return Query.Types[0].isVector() &&
+               Query.Types[0].getElementType() == Query.Types[1];
----------------
Type 0 should always be a vector, else it (should be) a verifier error so I don't think it's related to legality.

Likewise with the "Types[0].getElementType() == Query.Types[1]", that should be true otherwise it's an invalid instruction.

Here we should probably specify legality by using a whitelist of vector types that Type 0 could take, or some other way or narrowing down the legal types.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59325/new/

https://reviews.llvm.org/D59325





More information about the llvm-commits mailing list