[llvm-commits] [PATCH] Prevent the mixing of S and D registers for vsqrt/vdiv instructions on A15
Jim Grosbach
grosbach at apple.com
Fri Sep 28 11:02:54 PDT 2012
Hi Silviu and Tim,
Perhaps I missed it, but I didn't see where Jakob's question about why a pseudo instruction is necessary at all was addressed. I, too, don't follow why this is necessary.
(Re-quoted Jakob's email below for reference)
-Jim
On Sep 26, 2012, at 11:08 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
> On Sep 25, 2012, at 7:25 AM, Tim Northover <t.p.northover at gmail.com> wrote:
>
>> Hi all,
>>
>>> The attached patch prevents the mixing of D and S registers for vsqrt/vdiv
>>> instructions when using neonfp on A15. This is necessary since single
>>> precision math instructions use D registers when using neonfp, and there
>>> are no equivalent instructions for vsqrt and vdiv.
>>
>> I've taken a look at the patch, and while the extra duplicated
>> instruction to support this is rather a hack, I can't see any other
>> way to enforce the allocation constraints in that pattern.
>>
>> This is probably a necessary evil.
>
> It's not clear why the extra instruction is required. Could you elaborate, please?
>
> /jakob
On Sep 28, 2012, at 8:54 AM, Silviu Baranga <silbar01 at arm.com> wrote:
> Hi Tim,
>
> Thanks for catching the bug!
> I've added the NEON-specific PseudoInst and PseudoExpand
> classes in ARMInstrFormat.td and made sure that the instruction
> size is now specified.
>
> -- Silviu
>
>> -----Original Message-----
>> From: Tim Northover [mailto:t.p.northover at gmail.com]
>> Sent: 28 September 2012 16:38
>> To: Silviu Baranga
>> Cc: Jim Grosbach; llvm-commits at cs.uiuc.edu
>> Subject: Re: [llvm-commits] [PATCH] Prevent the mixing of S and D
>> registers for vsqrt/vdiv instructions on A15
>>
>> Hi Silviu,
>>
>>> It turns out that the PseudoInst can be expanded using only
>>> TableGen definitions. I've updated the patch and attached it.
>>
>> I'm afraid this one probably causes issues in the ARMConstantIsland
>> pass. The problem is that the Size field is left at the default, which
>> means that GetInstSizeInBytes in ARMBaseInstrInfo.cpp returns 0. I
>> think this means the ConstantIslandPass could miscalculate whether a
>> constant island is within range.
>>
>> Sorry.
>>
>> Tim.
> <sqrt_div_neonfp_a15.diff>
More information about the llvm-commits
mailing list