[PATCH] D90685: [SVE][AArch64] Improve specificity of vectorization legality TypeSize test

Joe Ellis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 05:41:49 PST 2020


joechrisellis added a comment.

@fpetrogalli sure!

The original patch was D89798 <https://reviews.llvm.org/D89798>, which fixed a TypeSize warning in loop vectorization legality. The test being modified in this patch defends against that warning. So:

- without D89798 <https://reviews.llvm.org/D89798>, a TypeSize warning will fire, so this test will fail.
- with D89798 <https://reviews.llvm.org/D89798>, a TypeSize warning will not fire, so this test will pass.

It turns out that `-O2` is probably not the best flag for this test; the passes performed by `-O2` are not guaranteed to remain consistent, so this test could fail if this changes in the future. Since the TypeSize warning arose in loop vectorization legality, it suffices to use `-loop-vectorize` here instead of `-O2`.

I have also tested this patch. It fails without D89798 <https://reviews.llvm.org/D89798> applied, but passes with D89798 <https://reviews.llvm.org/D89798> applied, so it is functionally equivalent to the old test but more future proof.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90685



More information about the llvm-commits mailing list