[llvm] r298957 - [AVX-512] Punt on fast-isel of truncates to i1 when AVX512 is enabled.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 16:42:07 PDT 2017


Test case added in r298959

~Craig

On Tue, Mar 28, 2017 at 4:20 PM, Craig Topper via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: ctopper
> Date: Tue Mar 28 18:20:37 2017
> New Revision: 298957
>
> URL: http://llvm.org/viewvc/llvm-project?rev=298957&view=rev
> Log:
> [AVX-512] Punt on fast-isel of truncates to i1 when AVX512 is enabled.
>
> We should be masking the value and emitting a register copy like we do in
> non-fast isel. Instead we were just updating the value map and emitting
> nothing.
>
> After r298928 we started seeing cases where we would create a copy from
> GR8 to GR32 because the source register in a VK1 to GR32 copy was replaced
> by the GR8 going into a truncate.
>
> This fixes PR32451.
>
>
> Modified:
>     llvm/trunk/lib/Target/X86/X86FastISel.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/
> X86/X86FastISel.cpp?rev=298957&r1=298956&r2=298957&view=diff
> ============================================================
> ==================
> --- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Tue Mar 28 18:20:37 2017
> @@ -2512,7 +2512,8 @@ bool X86FastISel::X86SelectTrunc(const I
>    EVT DstVT = TLI.getValueType(DL, I->getType());
>
>    // This code only handles truncation to byte.
> -  if (DstVT != MVT::i8 && DstVT != MVT::i1)
> +  // TODO: Support truncate to i1 with AVX512.
> +  if (DstVT != MVT::i8 && (DstVT != MVT::i1 || Subtarget->hasAVX512()))
>      return false;
>    if (!TLI.isTypeLegal(SrcVT))
>      return false;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170328/0576ec66/attachment.html>


More information about the llvm-commits mailing list