GlobalISel: avoid inserting redundant COPYs for bitcasts.
authorTim Northover <tnorthover@apple.com>
Wed, 10 Aug 2016 16:51:14 +0000 (16:51 +0000)
committerTim Northover <tnorthover@apple.com>
Wed, 10 Aug 2016 16:51:14 +0000 (16:51 +0000)
commit7552ef5a00b9f1112cc08bd4c7db99b24e6496e5
tree7b08ca6d05693e80947f5c3baa369babba45711f
parenta3386501afd12a5680545c9c462fac67561a48fa
GlobalISel: avoid inserting redundant COPYs for bitcasts.

If the value produced by the bitcast hasn't been referenced yet, we can simply
reuse the input register avoiding an unnecessary COPY instruction.

llvm-svn: 278245
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll