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

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 13:26:42 PST 2017


> On Jan 9, 2017, at 1:26 PM, Matthias Braun via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> 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…)


Thanks for double checking.

> 
> 
> Repository:
>  rL LLVM
> 
> https://reviews.llvm.org/D28474
> 
> 
> 



More information about the llvm-commits mailing list