aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/OptimizeExts.cpp
AgeCommit message (Collapse)Author
2010-01-13Commit some changes I had managed to lose last night while refactoring the ↵Evan Cheng
code. Avoid change use of PHI instructions because it's not legal to insert any instructions before them. This fixes PR6027. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93335 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13Add comment; refactor; avoid pulling in DT if it's not used.Evan Cheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13Add a quick pass to optimize sign / zero extension instructions. For targets ↵Evan Cheng
where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg. For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93278 91177308-0d34-0410-b5e6-96231b3b80d8