r334416 - [X86] Properly account for the immediate being multiplied by 8 in the immediate range checking for BI__builtin_ia32_psrldqi128 and friends.
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 11 09:34:10 PDT 2018
Author: ctopper
Date: Mon Jun 11 09:34:10 2018
New Revision: 334416
URL: http://llvm.org/viewvc/llvm-project?rev=334416&view=rev
Log:
[X86] Properly account for the immediate being multiplied by 8 in the immediate range checking for BI__builtin_ia32_psrldqi128 and friends.
The limit was set to 1023 which only up to 127*8. It needs to be 2047 to allow 255*8.
Modified:
cfe/trunk/lib/Sema/SemaChecking.cpp
Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=334416&r1=334415&r2=334416&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Mon Jun 11 09:34:10 2018
@@ -2911,7 +2911,7 @@ bool Sema::CheckX86BuiltinFunctionCall(u
case X86::BI__builtin_ia32_psrldqi128:
case X86::BI__builtin_ia32_psrldqi256:
case X86::BI__builtin_ia32_psrldqi512:
- i = 1; l = 0; u = 1023;
+ i = 1; l = 0; u = 2047;
break;
}
return SemaBuiltinConstantArgRange(TheCall, i, l, u);
More information about the cfe-commits
mailing list