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

Hal Finkel hfinkel at anl.gov
Mon Nov 25 11:32:24 PST 2013

----- Original Message -----
> From: "Artyom Skrobov" <Artyom.Skrobov at arm.com>
> To: "Hal Finkel" <hfinkel at anl.gov>, "Tim Northover" <t.p.northover at gmail.com>
> Cc: "Joey Gouly" <Joey.Gouly at arm.com>, llvm-commits at cs.uiuc.edu
> Sent: Friday, November 22, 2013 9:00:07 AM
> Subject: RE: [llvm] r190309 - [ARMv8] Prevent generation of deprecated IT	blocks	on ARMv8 in Thumb mode.
> Hello Hal & Tim,
> > 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)?
> I'm attaching a new patch which reverts IfConverter::ScanInstructions
> to its original logic (checking the predicated status of the
> conditional branches) and implements Thumb2InstrInfo::isPredicated
> to reflect the somewhat unorthodox "conditional but not predicated"
> convention for the ARMv8/Thumb conditional branches.
> Hal, can you confirm that this patch restores the correct functioning
> on PPC?

I'll check.

Why are you restoring this part?

     if (BBI.ClobbersPred && !isPredicated) {
       // Predicate modification instruction should end the block (except for
       // already predicated instructions and end of block branches).
+      if (isCondBr) {
+        // A conditional branch is not predicable, but it may be eliminated.
+        continue;
+      }

Thanks again,

> Tim, can you review my changes to Thumb2InstrInfo? In part, should
> the change depend on hasV8Ops?

Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory

More information about the llvm-commits mailing list