[llvm] r190309 - [ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
Hal Finkel
hfinkel at anl.gov
Wed Nov 27 13:32:55 PST 2013
----- Original Message -----
> From: "Artyom Skrobov" <Artyom.Skrobov at arm.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Joey Gouly" <Joey.Gouly at arm.com>, llvm-commits at cs.uiuc.edu, "Tim Northover" <t.p.northover at gmail.com>
> Sent: Wednesday, November 27, 2013 1:49:13 PM
> Subject: RE: [llvm] r190309 - [ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
>
> Hello Hal,
>
> >> 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;
> > + }
> > +
>
> This enables conversion of fragments such as
>
> cmp r12, r2
> bne .LBB6_4
> @ BB#2:
> cmp r1, r3
> bne .LBB6_4
> strexd r5, lr, r4, [r0]
>
> into
>
> cmp r12, r2
> it eq
> cmpeq r1, r3
> bne .LBB6_4
> @ BB#2:
> strexd r5, lr, r4, [r0]
>
> As you can see, in this case, the last instruction of the branch (cmp
> r1, r3; bne .LBB6_4) is not predicable on the branch condition (the
> original CPSR), but it's going to be eliminated during the
> conversion, so its non-predicability doesn't matter.
Can you explain what this means? I still obviously see those instructions in the transformation result.
>
>
> In the meantime, have you been able to create a test case for the
> invalid PPC code generation being caused by r190309 ?
>
I've certainly made a lot of progress on this. I've discussed some of this in the e-mail(s) that I sent to you on Monday. I could certainly appreciate your comments on those. I will continue to work on creating a useful .ll input that demonstrates the problem.
Thanks again,
Hal
>
>
>
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list