[AArch64] Check Dest Register Liveness in CondOpt pass.
authorChad Rosier <mcrosier@codeaurora.org>
Fri, 31 Oct 2014 19:02:38 +0000 (19:02 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Fri, 31 Oct 2014 19:02:38 +0000 (19:02 +0000)
commit7bb413e3baf859e69b9c844108a0bd71eb176140
tree4047444a197611d9f7d8293f9bda7e9c45f1f78d
parent5f1b4e8f58cdad859568f7bf213fd6ad62dbb072
[AArch64] Check Dest Register Liveness in CondOpt pass.

Our internal test reveals such case should not be transformed:

  cmp x17, #3
  b.lt .LBB10_15
  ...
  subs x12, x12, #1
  b.gt .LBB10_1

where x12 is a liveout, becomes:

  cmp x17, #2
  b.le .LBB10_15
  ...
  subs x12, x12, #2
  b.ge .LBB10_1

Unable to provide test case as it's difficult to reproduce on community branch.

http://reviews.llvm.org/D6048
Patch by Zhaoshi Zheng <zhaoshiz@codeaurora.org>!

llvm-svn: 220987
llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp