[PATCH] D36858: [x86] Teach the cmov converter to aggressively convert cmovs with memory operands into control flow.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 01:21:26 PDT 2017


chandlerc added a comment.

I've run this across SPEC CPU 2006 and the LLVM test suite on my Haswell system.

Only 11 programs had a different hash, only three from SPEC (433.milc, 445.gobmk, 483.xalancbmk).

Of those, only two had any significant changes in performance that a quick test showed. It is a bit hard to be 100% certain, the test suite is very noisy. Those two (PENNANT and consumer-typeset) had 4.7% and 5.4% difference theoretically.

However, when re-running each under `perf stat` I saw no significant cycle count or instruction count difference and the timings swung in both directions so this appears to be just noise.

So I think this is totally fine for the LLVM test suite and SPEC.

And our internal benchmarks (which have a bit more to carefully measure and minimize noise) show no significant regressions and at least a couple of significant improvements. There is some various shifting in each direction of course, but it seems net positive or neutral across Sandybridge, Haswell, and Skylake.

I think this covers a reasonable set of performance data for checking in, so code review would be very much appreciated. If there are other benchmarks or systems others want to run, by all means. Note that there is a flag to disable this behavior as well.


https://reviews.llvm.org/D36858





More information about the llvm-commits mailing list