The test was using -O2, where -loop-vectorize will suffice.
The original patch was D89798, which fixed a TypeSize warning in loop vectorization legality. The test being modified in this patch defends against that warning. So:
- without D89798, a TypeSize warning will fire, so this test will fail.
- with 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.