[cfe-commits] r114239 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Bill Wendling wendling at apple.com
Fri Sep 17 17:14:55 PDT 2010


I have a testcase for this, but unfortunately MMX doesn't seem to be supported in clang at the moment. (The -mmmx flag doesn't work.)

-bw

On Sep 17, 2010, at 4:46 PM, Bill Wendling wrote:

> Author: void
> Date: Fri Sep 17 18:46:16 2010
> New Revision: 114239
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=114239&view=rev
> Log:
> The MMX shift-with-immediate builtins require the equivalent
> shift-with-immediate LLVM intrinsics.
> 
> Modified:
>    cfe/trunk/lib/CodeGen/CGBuiltin.cpp
> 
> Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=114239&r1=114238&r2=114239&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Fri Sep 17 18:46:16 2010
> @@ -1944,35 +1944,35 @@
>     default: assert(0 && "Unsupported shift intrinsic!");
>     case X86::BI__builtin_ia32_pslldi:
>       name = "pslldi";
> -      ID = Intrinsic::x86_mmx_psll_d;
> +      ID = Intrinsic::x86_mmx_pslli_d;
>       break;
>     case X86::BI__builtin_ia32_psllqi:
>       name = "psllqi";
> -      ID = Intrinsic::x86_mmx_psll_q;
> +      ID = Intrinsic::x86_mmx_pslli_q;
>       break;
>     case X86::BI__builtin_ia32_psllwi:
>       name = "psllwi";
> -      ID = Intrinsic::x86_mmx_psll_w;
> +      ID = Intrinsic::x86_mmx_pslli_w;
>       break;
>     case X86::BI__builtin_ia32_psradi:
>       name = "psradi";
> -      ID = Intrinsic::x86_mmx_psra_d;
> +      ID = Intrinsic::x86_mmx_psrai_d;
>       break;
>     case X86::BI__builtin_ia32_psrawi:
>       name = "psrawi";
> -      ID = Intrinsic::x86_mmx_psra_w;
> +      ID = Intrinsic::x86_mmx_psrai_w;
>       break;
>     case X86::BI__builtin_ia32_psrldi:
>       name = "psrldi";
> -      ID = Intrinsic::x86_mmx_psrl_d;
> +      ID = Intrinsic::x86_mmx_psrli_d;
>       break;
>     case X86::BI__builtin_ia32_psrlqi:
>       name = "psrlqi";
> -      ID = Intrinsic::x86_mmx_psrl_q;
> +      ID = Intrinsic::x86_mmx_psrli_q;
>       break;
>     case X86::BI__builtin_ia32_psrlwi:
>       name = "psrlwi";
> -      ID = Intrinsic::x86_mmx_psrl_w;
> +      ID = Intrinsic::x86_mmx_psrli_w;
>       break;
>     }
>     llvm::Function *F = CGM.getIntrinsic(ID);
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits





More information about the cfe-commits mailing list