[PATCH] D43256: [MBP] Move a latch block with conditional exit and multi predecessors to top of loop

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 19 03:58:15 PDT 2019


ebrevnov added a comment.

In D43256#1591704 <https://reviews.llvm.org/D43256#1591704>, @davidxl wrote:

> Is the test case slow down with PGO or not?


No, it's not PGO.

> Also do you have branch misprediction perf data? (large slowdowns like this is usually triggered by side effect like this).

I do. There is no any branch/data/instruction miss predictions. LSD works 100% in both cases as well. Even after regression CPI is 0.3. That means we are execution bounded. If I run the benchmark under perf scores change a little and there is 19% difference instead of original 35%. About half of slowdown (8.3%) comes from increased path length due to extra jump instruction. Rest comes from CPI increase by 10%. I'm checking different hypotheses what could cause that but no success so far.

> Is there a trimmed down version to demonstrate the issue?

It is a simple loop consequently reading floating points (non NANs) from two array and writing minimum value to a third array:

  for (int i = 0; i < 320000; i++) {
     c[i] = min(a[i], b[i]);
  }


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D43256/new/

https://reviews.llvm.org/D43256





More information about the llvm-commits mailing list