[BranchFolding] do not iterate the aliases of virtual registers
authorJingyue Wu <jingyue@google.com>
Wed, 22 Jul 2015 04:16:52 +0000 (04:16 +0000)
committerJingyue Wu <jingyue@google.com>
Wed, 22 Jul 2015 04:16:52 +0000 (04:16 +0000)
commit9764983070bcd6c5268af5af0960a3a70cddeacd
tree78e7378b0485d575e9a199b05bb6aae3025482a7
parent2cf40d1ae5aaa43d1d2bf5b9d20ada5793fb599a
[BranchFolding] do not iterate the aliases of virtual registers

Summary:
MCRegAliasIterator only works for physical registers. So, do not run it
on virtual registers.

With this issue fixed, we can resurrect the BranchFolding pass in NVPTX
backend.

Reviewers: jholewinski, bkramer

Subscribers: henryhu, meheff, llvm-commits, jholewinski

Differential Revision: http://reviews.llvm.org/D11174

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242871 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/BranchFolding.cpp
lib/Target/NVPTX/NVPTXTargetMachine.cpp
test/CodeGen/NVPTX/branch-fold.ll [new file with mode: 0644]