Page MenuHomePhabricator

[X86][Costmodel] Load/store i16 Stride=6 VF=16 interleaving costs

Authored by lebedev.ri on Sep 27 2021, 2:39 PM.



The only sched models that for cpu's that support avx2
but not avx512 are: haswell, broadwell, skylake, zen1-3

For this tuple, measuring becomes problematic since there's a lot of spilling going on,
but apparently all these memory ops do not affect worst-case estimate at all here.

For load we have: - for intels Block RThroughput: <=106.0; for ryzens, Block RThroughput: <=34.8
So pick cost of 106.

For store we have: - for intels Block RThroughput: =58.0; for ryzens, Block RThroughput: <=20.5
So pick cost of 58.

I'm directly using the shuffling asm the llc produced,
without any manual fixups that may be needed
to ensure sequential execution.

Diff Detail

Unit TestsFailed

110 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-cxa-atexit.S
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-cxa-atexit.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-cxa-atexit.S
180 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-static-initializer.S
Script: -- : 'RUN: at line 7'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-static-initializer.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-static-initializer.S
180 msx64 debian > ORC-x86_64-linux.TestCases/Linux/x86-64::trivial-tls.S
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang -m64 -c -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/orc/X86_64LinuxConfig/TestCases/Linux/x86-64/Output/trivial-tls.S.tmp /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-tls.S
31,750 msx64 debian > libFuzzer.libFuzzer::fork.test
Script: -- : 'RUN: at line 3'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/lib/fuzzer -m64 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/fuzzer/SimpleTest.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/Output/fork.test.tmp-SimpleTest

Event Timeline

lebedev.ri created this revision.Sep 27 2021, 2:39 PM
RKSimon accepted this revision.Sep 28 2021, 8:47 AM


This revision is now accepted and ready to land.Sep 28 2021, 8:47 AM


@RKSimon thank you for the speedy reviews!


@RKSimon thank you for the speedy reviews!

Once these are in I have a WIP patch to add SSE2/AVX1/AVX512BW test coverage (with their terrible costs)

@RKSimon this is pretty embarrassing, but looks like i have uploaded the patch for VF=8 here.
The analysis / patch description is indeed for VF=16, but the diff isn't.
I'm going to guess this is fine, but i'll try to be more careful.

This revision was landed with ongoing or failed builds.Sep 28 2021, 9:16 AM
This revision was automatically updated to reflect the committed changes.