The code in this test should not have been vectorized.
It looks worse than the scalar code.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Should this go into one of the existing max tests we already have for X86 (e.g. llvm/test/Transforms/SLPVectorizer/X86/arith-smax.ll). Also, do we need the same case for unsigned?
Good point. I tried adding this function to arith-smax.ll but the issue is that the test maps multiple RUN lines to the same check-prefix and for this particular function that I am adding the output is actually different. I could fix this by adding a few more check-prefixes in arith-small.ll to avoid this conflict. But I think that arith-smax.ll is already quite a large test with four check-prefixes, so we should probably avoid making it even larger? I could rename this test to arith-smax-cost.ll and add the unsigned case? What do you think?
t. But I think that arith-smax.ll is already quite a large test with four check-prefixes, so we should probably avoid making it even larger? I could rename this test to arith-smax-cost.ll and add the unsigned case? What do you think?
Yeah sounds not worth extending the existing test if it requires more surgery to the check lines. Renaming the file to be in line with the existing tests should be fine. Maybe arith-max-cost.ll so the unsigned test can also be included?