[PATCH] Add support for ARM modified immediate syntax

Mihail Popa mihail.popa at gmail.com
Fri Aug 23 04:04:56 PDT 2013


> This isn't quite right. "#1, #30" is not canonical, for example (I
> only know this because I made the same mistake in my patch at first).

Yes, indeed. Thanks for spotting that.

Mihai


On Thu, Aug 22, 2013 at 11:46 AM, Tim Northover <t.p.northover at gmail.com>wrote:

> Hi Mihai,
>
> I think the approach is interesting, but a dead end. It cements the
> duplicated instructions rather than moving towards unification.
>
> http://llvm-reviews.chandlerc.com/D1432 *does* move that way (and also
> converts "add r0, #0, #0" back into "add r0, #0" automatically).
>
> That said, I did have a look at the code and spotted this:
>
> +  static inline bool isSOImmCanonical(unsigned Val, unsigned Rot) {
> +    if (Rot == 0) return true;
> +    if (Val == 0 && Rot != 0) return false;
> +    return (Val % 4) != 0;
> +  }
>
> This isn't quite right. "#1, #30" is not canonical, for example (I
> only know this because I made the same mistake in my patch at first).
>
> Cheers.
>
> Tim.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130823/fe121329/attachment.html>


More information about the llvm-commits mailing list