]> granicus.if.org Git - llvm/commit
PeepholeOptimizer: Do not replace SubregToReg(bitcast like)
authorMatthias Braun <matze@braunis.de>
Mon, 9 Jan 2017 21:38:17 +0000 (21:38 +0000)
committerMatthias Braun <matze@braunis.de>
Mon, 9 Jan 2017 21:38:17 +0000 (21:38 +0000)
commit33887e39056499591e29eb62e7908b990ef1ca45
tree369fc221bcd5514feae28218605def66c6c6a935
parentb4ff4983b87258ea0bca7852656180ef8d067ef6
PeepholeOptimizer: Do not replace SubregToReg(bitcast like)

While we can usually replace bitcast like instructions
(MachineInstr::isBitcast()) with a COPY this is not legal if any of the
users uses SUBREG_TO_REG to assert the upper bits of the result are
zero.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291483 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/PeepholeOptimizer.cpp
test/CodeGen/X86/peephole.mir [new file with mode: 0644]