[llvm-commits] PATCH: Fix broken DAGCombiner which creates illegal vector shuffles
Heikki Kultala
hkultala at cs.tut.fi
Fri Mar 9 01:35:22 PST 2012
>> In current llvm-trunk there is a bug:
>> If vector shuffles are not supported by the architecture but are
marked to be
>> expanded into extracts and builds, the dag legalization does this
expand, but
>> the dag combine which is done after the legalization converts these
extracts and
>> builds back to shuffles. This results an Cannot select error,
compilelation fails.
>>
>> This patch adds a check which prevents this illegal combining if the
>> architecture does not support shuffles.
>
> thanks for the patch, but unfortunately it causes this test to fail:
> CodeGen/X86/avx-zext.ll
> At a guess, "VT" may not be the type actually used by the shuffle.
>
It would seem "isOperationLegal()" does not consider custom-selected
operations as legal.
Using isOperationLegalOrCustom() instead or isOperationLegal() seems to
fix this.
Here is a fixed version of the patch attached
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_shuffle_expand_combine.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120309/c66d49c6/attachment.bin>
More information about the llvm-commits
mailing list