[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)
commitb9ce924135958b497bde2e549aff81e030a0a3cd
tree09012b645b1baf8e606a94a234297079baf56a1e
parent854432d7e55a169a46d319cf0edffab790709582
[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>!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220987 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ConditionOptimizer.cpp