[PATCH] ARM ISel: Don't create illegal types during LowerMUL

Renato Golin renato.golin at linaro.org
Tue May 14 13:00:46 PDT 2013


Hi Arnold,

Looks much simpler, thanks!

It seems that AddRequiredExtensionForVMULL() was reduced to very little and
is now only called from one place (SkipExtensionForVMULL) that could even
be simplified...

I'll test your patch on the test-suite and will let you know.

cheers,
--renato


On 14 May 2013 20:52, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:

> The transformation happening here is that we want to turn a
> "mul(ext(X), ext(X))" into a "vmull(X, X)", stripping off the extension.
> We have
> to make sure that X still has a valid vector type - possibly recreate an
> extension to a smaller type. In case of a extload of a memory type smaller
> than
> 64 bit we used create a ext(load()). The problem with doing this - instead
> of
> recreating an extload - is that an illegal type is exposed.
>
> This patch fixes this by creating extloads instead of ext(load())
> sequences.
>
> Fixes PR15970.
>
> radar://13871383
>
> From the bug report:
>
> Initially we had a
>
>   mul (v4i32 zextload(from v4i8), v4i32 zextload(from v4i8))
>
> the transform should create
>
>   vmull(v4i16 zextload(from v4i8), ...)
>
> out of this. But instead it creates a
>
>   vmull(v4i16 zext( v4i8 load()), ...
>
> where an illegal type is exposed.
>
> (This would only be exposed if this transform would run during normal
> legalization because vector legalization is allowed to create illegal
> types.)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130514/5b08a375/attachment.html>


More information about the llvm-commits mailing list