[PATCH] [RegisterScavenger] Fix handling of predicated instructions

Tobias Edler von Koch tobias at codeaurora.org
Fri Jun 5 15:41:04 PDT 2015


Hi Quentin,

Sorry for not replying earlier, this slipped through the net somehow!

On Tue, 28 Apr 2015 09:49:18 -0700 Quentin Colombet
<qcolombet at apple.com> wrote:

> > 
> > I don't know of a specific commit. But here's my reasoning:
> > 
> > If kill flags were incorrectly set on predicate instructions, wouldn't
> > we see uses of those registers after they were killed? The
> > MachineVerifier would flag these up.
> 
> Not necessarily. IIRC, the MachineVerifier relies on the live-in information which is updated independently than the kill flags. The consequence is as long as the libe-in information is correct and the uses in different block, the kill flag may be wrong and the MachineVerifier will not complain.
> 
> Could you double check how the MachineVerifier actually work with the kill flags?

Correct, the MachineVerifier uses live-in information to determine
which registers are live on basic block entry. But so does the
RegisterScavenger. 

This bug is about what happens locally *within* a basic block. And
that's where I can see no situation where you could legally have
a register that has a <kill> flag set and is then used (still within
the same BasicBlock).

Tobias

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project.




More information about the llvm-commits mailing list