[PATCH] [ARM] Fix required ISA for multiplication instructions

David Peixotto dpeixott at codeaurora.org
Thu Jan 16 09:48:13 PST 2014


There is a bug for this issue: http://llvm.org/bugs/show_bug.cgi?id=17647
And a patch fix it: 
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140113/201434.html

I thought the patch had been committed, but it looks like it was 
approved but not committed.

The reason for the two definitions of the SMLAL instructions is because 
the instruction has some unpredictable behavior on pre-armv6 when the 
destination register is also an output register. The armv6 version is 
less constrained. The constraints need to be respected for instruction 
selection, so the fix was to add an alias that can be used for parsing.

I think the above patch should fix your issue.

On 1/16/2014 7:12 AM, Richard Barton wrote:
> Hi all
>
> You are correct that ARM S/UMLAL are available from ARMv4. UMAAL is only
> available in ARMv6 and later though, so you need to modify your patch
> slightly.
>
> I’m afraid I am clueless on the instruction selection patches, so I will
> defer to Renato or Tim for those.
>
> Thanks
>
> Rich
>
> *From:*Renato Golin [mailto:renato.golin at linaro.org]
> *Sent:* 12 January 2014 14:20
> *To:* LLVM Commits; Tim Northover; Richard Barton
> *Subject:* Re: [PATCH] [ARM] Fix required ISA for multiplication
> instructions
>
> Hi Joerg,
>
>  From all I know about the early clobber flag in the table gen, your
> second patch looks fine.
>
> Your first patch also looks fine, though SMLALxy is not supported in
> ARMv4, so you should move its tests to something v5 and
> use Subtarget.hasV5TEOps().
>
> Before committing, I'd welcome reviews from Tim and Richard, just to
> make sure I'm not missing anything.
>
> cheers,
>
> --renato
>
> On 12 January 2014 03:41, Joerg Sonnenberger <joerg at britannica.bec.de
> <mailto:joerg at britannica.bec.de>> wrote:
>
> On Sun, Jan 12, 2014 at 03:00:51AM +0100, Joerg Sonnenberger wrote:
>  > while looking at building NetBSD for older ARM ISAs, I hit the issue
>  > that MC belives that umlal and friends are v6+ only. There seems to be
>  > no reason for the complications in the matching, so just drop it.
>
> Further analysis shows that this is likely a bug in the patterns.
> Can someone with more ARM knowledge please verify the attached patch?
>
> Joerg
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list