[PATCH] D81856: [SVE] Fix bad FixedVectorType cast in simplifyDivRem

Christopher Tetreault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 12:05:45 PDT 2020


ctetreau added a comment.

> I'm confused - if the test is already there, but it doesn't change with this patch, then what does the failure/bug look like?

The issue that this patch is solving is that this code calls getNumElements through a base VectorType pointer, which is going to be removed soon. getAggregateElement() will only return a value for a scalable vector constant if it is zeroinitializer or undef. Both of these cases are handled before the lines changed by this patch. The test I listed above hits this code path. What currently happens is getAggregateElement returns nullptr for each of 0 .. VTy->getElementCount().Min, and then the block exits. Essentially, this is NFC.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81856





More information about the llvm-commits mailing list