[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/

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Sep 20 12:39:23 PDT 2009


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?

/jakob




More information about the llvm-commits mailing list