[llvm] r212633 - Make AArch64FastISel::EmitIntExt explicitly check its source and destination types

Eric Christopher echristo at gmail.com
Wed Jul 9 11:19:17 PDT 2014


Thanks Louis!

-eric

On Wed, Jul 9, 2014 at 10:54 AM, Louis Gerbarg <lgg at apple.com> wrote:
> Author: louis
> Date: Wed Jul  9 12:54:32 2014
> New Revision: 212633
>
> URL: http://llvm.org/viewvc/llvm-project?rev=212633&view=rev
> Log:
> Make AArch64FastISel::EmitIntExt explicitly check its source and destination types
>
> This is a follow up to r212492. There should be no functional difference, but
> this patch makes it clear that SrcVT must be an i1/i8/16/i32 and DestVT must be
> an i8/i16/i32/i64.
>
> rdar://17516686
>
> Modified:
>     llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp
>
> Modified: llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp?rev=212633&r1=212632&r2=212633&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp (original)
> +++ llvm/trunk/lib/Target/AArch64/AArch64FastISel.cpp Wed Jul  9 12:54:32 2014
> @@ -1751,9 +1751,14 @@ unsigned AArch64FastISel::EmitIntExt(MVT
>                                       bool isZExt) {
>    assert(DestVT != MVT::i1 && "ZeroExt/SignExt an i1?");
>
> -  // FastISel does not have plumbing to deal with an MVT::i128, if we see one
> -  // so rather than return one we need to bail out to SelectionDAG.
> -  if (DestVT == MVT::i128)
> +  // FastISel does not have plumbing to deal with extensions where the SrcVT or
> +  // DestVT are odd things, so test to make sure that they are both types we can
> +  // handle (i1/i8/i16/i32 for SrcVT and i8/i16/i32/i64 for DestVT), otherwise
> +  // bail out to SelectionDAG.
> +  if (((DestVT != MVT::i8) && (DestVT != MVT::i16) &&
> +       (DestVT != MVT::i32) && (DestVT != MVT::i64)) ||
> +      ((SrcVT !=  MVT::i1) && (SrcVT !=  MVT::i8) &&
> +       (SrcVT !=  MVT::i16) && (SrcVT !=  MVT::i32)))
>      return 0;
>
>    unsigned Opc;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list