[llvm-commits] [llvm] r82311 - in /llvm/trunk: lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/MSP430/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/SystemZ/ lib/Target/X86/ lib/Target/XCore/ test/CodeGen/X86/

Chris Lattner clattner at apple.com
Sun Sep 20 13:42:35 PDT 2009


On Sep 20, 2009, at 12:39 PM, Jakob Stoklund Olesen wrote:

> Chris Lattner <clattner at apple.com> writes:
>
>> On Sep 19, 2009, at 2:51 AM, Evan Cheng wrote:
>>> Fix PR4926. When target hook EmitInstrWithCustomInserter() insert
>>> new basic blocks and update CFG, it should also inform sdisel of the
>>> changes so the phi source operands will come from the right basic
>>> blocks.
>>
>> Would it be possible for the machine code verifier to catch bugs like
>> this?
>
> I think so.
>
> The verifier already checks that all CFG predecessors are mentioned  
> in a
> phi instruction.
>
> It explicitly allows phi instructions to refer to MBBs that are not  
> CFG
> predecessors. I have seen this happen in ARM and X86 code, but it  
> should
> probably be considered an error?

That makes sense to me!  Evan, do you see any problem with that?

-Chris



More information about the llvm-commits mailing list