[PATCH] D119965: [LICM][PhaseOrder] Don't speculate in LICM until after running loop rotate

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 19:15:03 PDT 2022


Carrot added a comment.

If I specify -rotation-max-header-size=2, loop rotation can be disabled for Loop2, and the second LICM hoists the "or" instruction to PreHeader2, which dominates following "or" instruction. And later GVN and SLPVectorizer works as previously, I got vectorized instructions for LoopBody2.

But the performance is not restored, I got more register spills. Loop rotation can change Loop2 to a single block loop, which benefits many other optimizations, so it is also important to our eigen code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119965



More information about the llvm-commits mailing list