[PATCH] D115387: [instcombine] Canonicalize constant index type to i64 for extractelement/insertelement

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 09:55:32 PST 2021


lebedev.ri accepted this revision.
lebedev.ri added a comment.

lg



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:370
+/// matter, we just want a consistent type to simplify CSE.
+ConstantInt *getPreferredVectorIndex(ConstantInt *IndexC) {
+  const unsigned IndexBW = IndexC->getType()->getBitWidth();
----------------
Pull out the repeated `64` constant?


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

https://reviews.llvm.org/D115387



More information about the llvm-commits mailing list