[llvm] LoopVectorize: fix phi cost when it is scalar after vectorization (PR #74456)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 07:36:52 PST 2024


fhahn wrote:

> 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.

I think if you pass `-force-vector-width=4` to the X86 test case you can force it to be vectorized. Replacing the load in the test case with a store (like `  store i64 0, ptr %arrayidx, align 8`) would replace a recipe that will be removed with one that cannot be removed. Does that make sense?

https://github.com/llvm/llvm-project/pull/74456


More information about the llvm-commits mailing list