From d3623155a26fa01079612dd654d69f94f751e302 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 7 Jun 2018 17:28:03 +0000 Subject: [X86] Add back builtins for _mm_slli_si128/_mm_srli_si128 and similar intrinsics. We still lower them to native shuffle IR, but we do it in CGBuiltin.cpp now. This allows us to check the target feature and ensure the immediate fits in 8 bits. This also improves our -O0 codegen slightly because we're able to see the zeroinitializer in the shuffle. It looks like it got lost behind a store+load previously. llvm-svn: 334208 --- clang/lib/Sema/SemaChecking.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'clang/lib/Sema') diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 44c87316419..0c5be0506e0 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -2781,6 +2781,14 @@ bool Sema::CheckX86BuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { case X86::BI__builtin_ia32_rndscaless_round_mask: i = 4; l = 0; u = 255; break; + case X86::BI__builtin_ia32_pslldqi128: + case X86::BI__builtin_ia32_pslldqi256: + case X86::BI__builtin_ia32_pslldqi512: + case X86::BI__builtin_ia32_psrldqi128: + case X86::BI__builtin_ia32_psrldqi256: + case X86::BI__builtin_ia32_psrldqi512: + i = 1; l = 0; u = 1023; + break; } return SemaBuiltinConstantArgRange(TheCall, i, l, u); } -- cgit v1.2.3