[llvm] r190309 - [ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.

Artyom Skrobov Artyom.Skrobov at arm.com
Sat Nov 23 03:06:38 PST 2013


Hal, did you see my earlier message yesterday, proposing a patch that may be sufficient as the solution?

It would also be invaluable if you could put together a test that causes incorrect code generation for PPC target in this case.
Including such a test would reduce the risk that further changes to LLVM break PPC self-hosting again.


-----Original Message-----
From: Hal Finkel [mailto:hfinkel at anl.gov] 
Sent: 22 November 2013 22:42
To: Artyom Skrobov
Cc: Joey Gouly; llvm-commits at cs.uiuc.edu; Tim Northover
Subject: Re: [llvm] r190309 - [ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.

> Okay, so the issue is that, for PPC, we can't 'skip' the conditional
> branches; they need to be checked to see if they can be predicated
> during the instruction scan. Unfortunately, I can't think of a
> better solution than to create a new TTI function what toggles
> between the two behaviors. What if we added
> TTI->willVanishIfPredicated(MachineInstr *MI)?

Also, while we're looking at it... this also looks wrong:

     if (!isPredicated) {
       ...
     } else if (!AlreadyPredicated) {
       // FIXME: This instruction is already predicated before the
       // if-conversion pass. It's probably something like a conditional move.
       // Mark this block unpredicable for now.
       ...
     }

this should say:

    } else if (AlreadyPredicated) {

right?

Please get back to me about this ASAP. I'd like to get a fix in for this before rc2. Commenting out the 'if (isCondBr)' part unbreaks PPC self-hosting (but obviously is sub-optimal for ARM), and I think we can design a simple solution that makes everyone happy.

Thanks again,
Hal








More information about the llvm-commits mailing list