[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.

llvm-svn: 334416
This commit is contained in:
Craig Topper 2018-06-11 16:34:10 +00:00
parent c8b7a41a00
commit ae7179414d
1 changed files with 1 additions and 1 deletions

View File

@ -2911,7 +2911,7 @@ bool Sema::CheckX86BuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
case X86::BI__builtin_ia32_psrldqi128: case X86::BI__builtin_ia32_psrldqi128:
case X86::BI__builtin_ia32_psrldqi256: case X86::BI__builtin_ia32_psrldqi256:
case X86::BI__builtin_ia32_psrldqi512: case X86::BI__builtin_ia32_psrldqi512:
i = 1; l = 0; u = 1023; i = 1; l = 0; u = 2047;
break; break;
} }
return SemaBuiltinConstantArgRange(TheCall, i, l, u); return SemaBuiltinConstantArgRange(TheCall, i, l, u);