[PATCH] D82049: Fix crash in VectorCombine when attempting to peephole ConstantVector sequences

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 05:53:33 PDT 2020


spatel added a comment.

In D82049#2101882 <https://reviews.llvm.org/D82049#2101882>, @clin1 wrote:

> Good clarification: InstCombine vs. InstSimplify.
>  Merged and reduced test, full diff included.
>  If the patch is OK, could I ask you one more favor: to commit it? I do not have commit access to the project.


Sure I can commit for you.
But I just noticed a potential inefficiency, so I think we should make a logic adjustment. If we succeed at the preliminary cleanup, then we will run SimplifyInstructionsInBlock again on exit even if the main part of this pass didn't make changes.
It would be better if we make those independent with something like this:

  bool MadeCleanupChange = false;
  bool MadeVectorChange = false;
  ...
  MadeCleanupChange |= SimplifyInstructionsInBlock(&BB);
  ...
  MadeVectorChange |= foldExtractExtract(I, TTI);
  ...
  if (MadeVectorChange) { do more cleanup }
  ...
  return MadeCleanupChange | MadeVectorChange;


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82049





More information about the llvm-commits mailing list