[PATCH] D28474: PeepholeOptimizer: Do not replace SubregToReg(bitcast like)

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 13:26:07 PST 2017


MatzeB added a comment.

In https://reviews.llvm.org/D28474#640174, @qcolombet wrote:

> Hi Matthias,
>
> That's sad that bit casts have side effects, but I agree that it seems to be the best fix. As a side question, are there anything else that check for isBitcast in other optimizations and that may have similar issues?
>
> Anyhow, LGTM.
>
> Cheers,
> -Quentin


That's the only user of MachineInstr::isBitcast(). Of course I do not know if we aren't doing replacements somewhere else that are possibly invalid because they violate the expectations of a SUBREG_TO_REG users (I would describe it as SUBREG_TO_REG breaking referential transparency that we would expect in MachineSSA...)


Repository:
  rL LLVM

https://reviews.llvm.org/D28474





More information about the llvm-commits mailing list