summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-06-14 22:02:35 +0000
committerCraig Topper <craig.topper@intel.com>2018-06-14 22:02:35 +0000
commit31730ae761724be1787cf6400e60097d09dafa81 (patch)
tree226ee21f56bab02dc96be6f2a87ea436a8dc8de8 /clang/lib/Sema/SemaChecking.cpp
parent2153c42358ac1b30d3b9ca97c38b747b9a819585 (diff)
downloadbcm5719-llvm-31730ae761724be1787cf6400e60097d09dafa81.tar.gz
bcm5719-llvm-31730ae761724be1787cf6400e60097d09dafa81.zip
[X86] Rename __builtin_ia32_pslldqi128 to __builtin_ia32_pslldqi128_byteshift and similar for other sizes. Remove the multiply by 8 from the header files.
The previous names took the shift amount in bits to match gcc and required a multiply by 8 in the header. This creates a misleading error message when we check the range of the immediate to the builtin since the allowed range also got multiplied by 8. This commit changes the builtins to use a byte shift amount to match the underlying instruction and the Intel intrinsic. Fixes the remaining issue from PR37795. llvm-svn: 334773
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index dfe4373f33b..9de512c7008 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -2821,6 +2821,12 @@ bool Sema::CheckX86BuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) {
case X86::BI__builtin_ia32_fpclasspd512_mask:
case X86::BI__builtin_ia32_fpclasssd_mask:
case X86::BI__builtin_ia32_fpclassss_mask:
+ case X86::BI__builtin_ia32_pslldqi128_byteshift:
+ case X86::BI__builtin_ia32_pslldqi256_byteshift:
+ case X86::BI__builtin_ia32_pslldqi512_byteshift:
+ case X86::BI__builtin_ia32_psrldqi128_byteshift:
+ case X86::BI__builtin_ia32_psrldqi256_byteshift:
+ case X86::BI__builtin_ia32_psrldqi512_byteshift:
i = 1; l = 0; u = 255;
break;
case X86::BI__builtin_ia32_vperm2f128_pd256:
@@ -2917,14 +2923,6 @@ 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 = 2047;
- break;
}
return SemaBuiltinConstantArgRange(TheCall, i, l, u);
}
OpenPOWER on IntegriCloud