Re-commit : [LICM] Allow sinking when foldable in loop
authorJun Bum Lim <junbuml@codeaurora.org>
Fri, 15 Dec 2017 20:33:24 +0000 (20:33 +0000)
committerJun Bum Lim <junbuml@codeaurora.org>
Fri, 15 Dec 2017 20:33:24 +0000 (20:33 +0000)
commit44c58d35c1a7343128a38aa2a3f1648bd027a65d
tree8be5f8cb6e51eea2ab8eef997a12c3d62b267406
parent67ca67d1b2223f1761ecd41d29b2e41c2bcd9dfc
Re-commit : [LICM] Allow sinking when foldable in loop

This recommits r320823 reverted due to the test failure in sink-foldable.ll and
an unused variable. Added "REQUIRES: aarch64-registered-target" in the test
and removed unused variable.

Original commit message:

  Continue trying to sink an instruction if its users in the loop is foldable.
  This will allow the instruction to be folded in the loop by decoupling it from
  the user outside of the loop.

  Reviewers: hfinkel, majnemer, davidxl, efriedma, danielcdh, bmakam, mcrosier

  Reviewed By: hfinkel

  Subscribers: javed.absar, bmakam, mcrosier, llvm-commits

  Differential Revision: https://reviews.llvm.org/D37076

llvm-svn: 320858
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/sink-foldable.ll [new file with mode: 0644]