[PowerPC] Fix __builtin_pdepd and __builtin_pextd to be 64-bit and P10 only.
The `__builtin_pdepd` and `__builtin_pextd` are P10 builtins that are meant to be used under 64-bit only. For instance, when the builtins are compiled under 32-bit mode: ``` $ cat t.c unsigned long long foo(unsigned long long a, unsigned long long b) { return __builtin_pextd(a,b); } $ clang -c t.c -mcpu=pwr10 -m32 ExpandIntegerResult #0: t31: i64 = llvm.ppc.pextd TargetConstant:i32<6928>, t28, t29 fatal error: error in backend: Do not know how to expand the result of this operator! ``` This patch adds sema checking for these builtins to compile under 64-bit mode only and on P10. The builtins will emit a diagnostic when they are compiled on non-P10 compilations and on 32-bit mode. Differential Revision: https://reviews.llvm.org/D118753
Loading
Please register or sign in to comment