PATCH: R600/SI: Enable the verifier on most lit tests

Tom Stellard tom at
Fri Oct 4 11:19:22 PDT 2013

On Fri, Oct 04, 2013 at 10:01:32AM -0700, Owen Anderson wrote:
> On Oct 3, 2013, at 5:36 PM, Tom Stellard <tom at> wrote:
> > Unfortunately, we cannot enable the machine verifier on tests that have
> > branches, because the way IF and ELSE instructions are selected leaves us
> > with a copy instruction following the IF and ELSE terminators, which
> > violates one of the verifier rules.
> Can’t you split blocks as necessary to make this legal?
> —Owen

The problem comes from a DAG sequence like this:

0x67e7c0: i64,ch = SI_IF 0x67f1c0, 0x682350, 0x681e50 [ORD=14]

0x681d50: i32 = TargetConstant<0>

  0x682550: ch = BasicBlock<ELSE 0x673af0>

    0x67e7c0: <multiple use>
    0x681f50: i64 = Register %vreg2

    0x67e7c0: <multiple use>
  0x67e8c0: ch,glue = CopyToReg 0x67e7c0:1, 0x681f50, 0x67e7c0 [ORD=14]

0x682650: ch = S_BRANCH 0x682550, 0x67e8c0 [ORD=14]

SI_IF is a terminator and the CopyToReg node will be lowered to COPY.
The verifier is run immediately after ISel and before the
expandPostISelPseudo pass, so I don't think there is any way to split the
blocks this early.


More information about the llvm-commits mailing list