[llvm] LoopVectorize: fix phi cost when it is scalar after vectorization (PR #74456)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 3 05:41:57 PST 2024
artagnon wrote:
> Ideally we would have a test for both cases that are impacted by the patch: vectorizing with the new cost and also not vectorizing (and not crashing).
Okay, I struggled a lot with your requests, because the bug is very subtle:
1. It's impossible to get a test under X86 to first crash, and then be vectorized after the fix, since vectorization depends on sse4.2, and the bug isn't triggered when sse4.2 is enabled.
2. I tried everything, but I think it's impossible to remove the SCEV checks.
3. I tried to use the result of the recurrence in a lot of ways, but none of them get the test to crash first, and then be vectorized after the fix.
I think we have no choice but to revert to my original version of X86 and AArch64 tests.
https://github.com/llvm/llvm-project/pull/74456
More information about the llvm-commits
mailing list