[llvm-commits] PATCH: Fix broken DAGCombiner which creates illegal vector shuffles
Heikki Kultala
hkultala at cs.tut.fi
Tue Mar 13 12:27:15 PDT 2012
On 9 Mar 2012, at 11:35, Heikki Kultala wrote:
>>> 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.
Could someone please commit this?
More information about the llvm-commits
mailing list