]> granicus.if.org Git - llvm/commit
[MachineCopyPropagation] Remove redundant copies after TailDup via machine-cp
authorKai Luo <lkail@cn.ibm.com>
Mon, 9 Sep 2019 02:32:42 +0000 (02:32 +0000)
committerKai Luo <lkail@cn.ibm.com>
Mon, 9 Sep 2019 02:32:42 +0000 (02:32 +0000)
commit8033db9a2d361f5a0354f9333b2638599839693b
tree2edc73426964437aabc242327e553debc06550f8
parente0faba8f42245c85a7317c420fa7f2d5fb5aa227
[MachineCopyPropagation] Remove redundant copies after TailDup via machine-cp

Summary:
After tailduplication, we have redundant copies. We can remove these
copies in machine-cp if it's safe to, i.e.
```
$reg0 = OP ...
... <<< No read or clobber of $reg0 and $reg1
$reg1 = COPY $reg0 <<< $reg0 is killed
...
<RET>
```
will be transformed to
```
$reg1 = OP ...
...
<RET>
```

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371359 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineCopyPropagation.cpp
test/CodeGen/PowerPC/redundant-copy-after-tail-dup.ll
test/CodeGen/X86/mul-i512.ll
test/CodeGen/X86/umulo-128-legalisation-lowering.ll