[PATCH] D84108: [SimplifyCFG][LoopRotate] SimplifyCFG: disable common instruction hoisting by default, enable late in pipeline

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 10:43:12 PDT 2021


fhahn added a comment.

FYI, I tracked down another ~50% regression in one of our benchmarks to this change. It boils down to failing to vectorize the loop below (or here https://clang.godbolt.org/z/sbjd8Wshx). I put up D100329 <https://reviews.llvm.org/D100329>, which always allows hoisting if only a termintor needs to be hoisted, which effectively replaces the original terminator.

  double clamp(double v) {
    if (v < 0.0)
      return 0.0;
    if (v > 6.0)
      return 6.0;
    return v;
  }
  
  void loop(double* X, double *Y) {
    for (unsigned i = 0; i < 20000; i++) {
      X[i] = clamp(Y[i]);
    }
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84108



More information about the llvm-commits mailing list