[PATCH] D60811: [PowerPC] Fix wrong ElemSIze when calling isConsecutiveLS()

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 14:38:10 PDT 2019


efriedma added a comment.

This fix is wrong.  For vectors where the element type is not byte-sized, loads can't be "consecutive" in the sense of this function; the store size of `<2 x i1>` is one byte.

The right fix is to return early from combineBVOfConsecutiveLoads for vector types where getVectorElementType().isByteSized() is false.  Or you could probably just check `!isTypeLegal(N->getValueType(0))`; even if the transform is legal, it likely isn't profitable for illegal vector types.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60811





More information about the llvm-commits mailing list