From a23326b5c244a03bf61ebb86db60a777ea26f926 Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Thu, 17 Jun 2010 04:17:01 +0000 Subject: [PATCH] Generate arm_neon.inc in include/clang/Basic, which provides: 1. builtins definitions for BuiltinsARM.def 2. intrinsic validation code for SemaChecking Unsure as to whether this is the best way to handle the make dependencies or not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106208 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/BuiltinsARM.def | 216 +------------- include/clang/Basic/Makefile | 6 +- .../clang/Basic}/arm_neon.td | 0 lib/Headers/CMakeLists.txt | 2 +- lib/Headers/Makefile | 4 +- lib/Sema/SemaChecking.cpp | 282 +----------------- 6 files changed, 17 insertions(+), 493 deletions(-) rename {lib/Headers => include/clang/Basic}/arm_neon.td (100%) diff --git a/include/clang/Basic/BuiltinsARM.def b/include/clang/Basic/BuiltinsARM.def index 3172e65fef..54e4c2b208 100644 --- a/include/clang/Basic/BuiltinsARM.def +++ b/include/clang/Basic/BuiltinsARM.def @@ -19,218 +19,8 @@ BUILTIN(__clear_cache, "vc*c*", "") BUILTIN(__builtin_thread_pointer, "v*", "") // NEON -BUILTIN(__builtin_neon_vaba_v, "V8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vabaq_v, "V16cV16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vabal_v, "V16cV16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vabd_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vabdq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vabdl_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vabs_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vabsq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vaddhn_v, "V8cV16cV16ci", "n") -BUILTIN(__builtin_neon_vaddl_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vaddw_v, "V16cV16cV8ci", "n") -BUILTIN(__builtin_neon_vcage_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vcageq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vcagt_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vcagtq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vcale_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vcaleq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vcalt_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vcaltq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vcls_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vclsq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vclz_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vclzq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vcnt_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vcntq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vcvt_f16_v, "V8cV16ci", "n") -BUILTIN(__builtin_neon_vcvt_f32_v, "V2fV8ci", "n") -BUILTIN(__builtin_neon_vcvtq_f32_v, "V4fV16ci", "n") -BUILTIN(__builtin_neon_vcvt_f32_f16, "V16cV8ci", "n") -BUILTIN(__builtin_neon_vcvt_n_f32_v, "V2fV8cii", "n") -BUILTIN(__builtin_neon_vcvtq_n_f32_v, "V4fV16cii", "n") -BUILTIN(__builtin_neon_vcvt_n_s32_v, "V8cV8cii", "n") -BUILTIN(__builtin_neon_vcvtq_n_s32_v, "V16cV16cii", "n") -BUILTIN(__builtin_neon_vcvt_n_u32_v, "V8cV8cii", "n") -BUILTIN(__builtin_neon_vcvtq_n_u32_v, "V16cV16cii", "n") -BUILTIN(__builtin_neon_vcvt_s32_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vcvtq_s32_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vcvt_u32_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vcvtq_u32_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vext_v, "V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vextq_v, "V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vget_lane_i8, "UcV8ci", "n") -BUILTIN(__builtin_neon_vget_lane_i16, "UsV4si", "n") -BUILTIN(__builtin_neon_vget_lane_i32, "UiV2ii", "n") -BUILTIN(__builtin_neon_vget_lane_f32, "fV2fi", "n") -BUILTIN(__builtin_neon_vgetq_lane_i8, "UcV16ci", "n") -BUILTIN(__builtin_neon_vgetq_lane_i16, "UsV8si", "n") -BUILTIN(__builtin_neon_vgetq_lane_i32, "UiV4ii", "n") -BUILTIN(__builtin_neon_vgetq_lane_f32, "fV4fi", "n") -BUILTIN(__builtin_neon_vget_lane_i64, "ULLiV1LLii", "n") -BUILTIN(__builtin_neon_vgetq_lane_i64, "ULLiV2LLii", "n") -BUILTIN(__builtin_neon_vhadd_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vhaddq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vhsub_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vhsubq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vld1q_v, "V16cvC*i", "n") -BUILTIN(__builtin_neon_vld1_v, "V8cvC*i", "n") -BUILTIN(__builtin_neon_vld1q_dup_v, "V16cvC*i", "n") -BUILTIN(__builtin_neon_vld1_dup_v, "V8cvC*i", "n") -BUILTIN(__builtin_neon_vld1q_lane_v, "V16cvC*ii", "n") -BUILTIN(__builtin_neon_vld1_lane_v, "V8cvC*ii", "n") -BUILTIN(__builtin_neon_vld2q_v, "V32cvC*i", "n") -BUILTIN(__builtin_neon_vld2_v, "V16cvC*i", "n") -BUILTIN(__builtin_neon_vld2_dup_v, "V16cvC*i", "n") -BUILTIN(__builtin_neon_vld2q_lane_v, "V32cvC*ii", "n") -BUILTIN(__builtin_neon_vld2_lane_v, "V16cvC*ii", "n") -BUILTIN(__builtin_neon_vld3q_v, "V48cvC*i", "n") -BUILTIN(__builtin_neon_vld3_v, "V24cvC*i", "n") -BUILTIN(__builtin_neon_vld3_dup_v, "V24cvC*i", "n") -BUILTIN(__builtin_neon_vld3q_lane_v, "V48cvC*ii", "n") -BUILTIN(__builtin_neon_vld3_lane_v, "V24cvC*ii", "n") -BUILTIN(__builtin_neon_vld4q_v, "V64cvC*i", "n") -BUILTIN(__builtin_neon_vld4_v, "V32cvC*i", "n") -BUILTIN(__builtin_neon_vld4_dup_v, "V32cvC*i", "n") -BUILTIN(__builtin_neon_vld4q_lane_v, "V64cvC*ii", "n") -BUILTIN(__builtin_neon_vld4_lane_v, "V32cvC*ii", "n") -BUILTIN(__builtin_neon_vmax_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vmaxq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vmin_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vminq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vmlal_v, "V16cV16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vmlal_lane_v, "V16cV16cV8cV8cii", "n") -BUILTIN(__builtin_neon_vmla_lane_v, "V8cV8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vmlaq_lane_v, "V16cV16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vmlsl_v, "V16cV16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vmlsl_lane_v, "V16cV16cV8cV8cii", "n") -BUILTIN(__builtin_neon_vmls_lane_v, "V8cV8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vmlsq_lane_v, "V16cV16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vmovl_v, "V16cV8ci", "n") -BUILTIN(__builtin_neon_vmovn_v, "V8cV16ci", "n") -BUILTIN(__builtin_neon_vmull_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vmull_lane_v, "V16cV8cV8cii", "n") -BUILTIN(__builtin_neon_vpadal_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vpadalq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vpadd_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vpaddl_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vpaddlq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vpmax_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vpmin_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqabs_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vqabsq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vqadd_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqaddq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vqdmlal_v, "V16cV16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqdmlal_lane_v, "V16cV16cV8cV8cii", "n") -BUILTIN(__builtin_neon_vqdmlsl_v, "V16cV16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqdmlsl_lane_v, "V16cV16cV8cV8cii", "n") -BUILTIN(__builtin_neon_vqdmulh_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqdmulhq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vqdmulh_lane_v, "V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vqdmulhq_lane_v, "V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vqdmull_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqdmull_lane_v, "V16cV8cV8cii", "n") -BUILTIN(__builtin_neon_vqmovn_v, "V8cV16ci", "n") -BUILTIN(__builtin_neon_vqmovun_v, "V8cV16ci", "n") -BUILTIN(__builtin_neon_vqneg_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vqnegq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vqrdmulh_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqrdmulhq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vqrdmulh_lane_v, "V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vqrdmulhq_lane_v, "V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vqrshl_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqrshlq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vqrshrn_n_v, "V8cV16cii", "n") -BUILTIN(__builtin_neon_vqrshrun_n_v, "V8cV16cii", "n") -BUILTIN(__builtin_neon_vqshl_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqshlq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vqshlu_n_v, "V8cV8cii", "n") -BUILTIN(__builtin_neon_vqshluq_n_v, "V16cV16cii", "n") -BUILTIN(__builtin_neon_vqshl_n_v, "V8cV8cii", "n") -BUILTIN(__builtin_neon_vqshlq_n_v, "V16cV16cii", "n") -BUILTIN(__builtin_neon_vqshrn_n_v, "V8cV16cii", "n") -BUILTIN(__builtin_neon_vqshrun_n_v, "V8cV16cii", "n") -BUILTIN(__builtin_neon_vqsub_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vqsubq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vraddhn_v, "V8cV16cV16ci", "n") -BUILTIN(__builtin_neon_vrecpe_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vrecpeq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vrecps_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vrecpsq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vrhadd_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vrhaddq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vrshl_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vrshlq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vrshrn_n_v, "V8cV16cii", "n") -BUILTIN(__builtin_neon_vrshr_n_v, "V8cV8cii", "n") -BUILTIN(__builtin_neon_vrshrq_n_v, "V16cV16cii", "n") -BUILTIN(__builtin_neon_vrsqrte_v, "V8cV8ci", "n") -BUILTIN(__builtin_neon_vrsqrteq_v, "V16cV16ci", "n") -BUILTIN(__builtin_neon_vrsqrts_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vrsqrtsq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vrsra_n_v, "V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vrsraq_n_v, "V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vrsubhn_v, "V8cV16cV16ci", "n") -BUILTIN(__builtin_neon_vset_lane_i8, "V8cUcV8ci", "n") -BUILTIN(__builtin_neon_vset_lane_i16, "V4sUsV4si", "n") -BUILTIN(__builtin_neon_vset_lane_i32, "V2iUiV2ii", "n") -BUILTIN(__builtin_neon_vset_lane_f32, "V2ffV2fi", "n") -BUILTIN(__builtin_neon_vsetq_lane_i8, "V16cUcV16ci", "n") -BUILTIN(__builtin_neon_vsetq_lane_i16, "V8sUsV8si", "n") -BUILTIN(__builtin_neon_vsetq_lane_i32, "V4iUiV4ii", "n") -BUILTIN(__builtin_neon_vsetq_lane_f32, "V4ffV4fi", "n") -BUILTIN(__builtin_neon_vset_lane_i64, "V1LLiULLiV1LLii", "n") -BUILTIN(__builtin_neon_vsetq_lane_i64, "V2LLiULLiV2LLii", "n") -BUILTIN(__builtin_neon_vshl_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vshlq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vshll_n_v, "V16cV8cii", "n") -BUILTIN(__builtin_neon_vshl_n_v, "V8cV8cii", "n") -BUILTIN(__builtin_neon_vshlq_n_v, "V16cV16cii", "n") -BUILTIN(__builtin_neon_vshrn_n_v, "V8cV16cii", "n") -BUILTIN(__builtin_neon_vshr_n_v, "V8cV8cii", "n") -BUILTIN(__builtin_neon_vshrq_n_v, "V16cV16cii", "n") -BUILTIN(__builtin_neon_vsli_n_v, "V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vsliq_n_v, "V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vsra_n_v, "V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vsraq_n_v, "V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vsri_n_v, "V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vsriq_n_v, "V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vst1q_v, "vv*V16ci", "n") -BUILTIN(__builtin_neon_vst1_v, "vv*V8ci", "n") -BUILTIN(__builtin_neon_vst1q_lane_v, "vv*V16cii", "n") -BUILTIN(__builtin_neon_vst1_lane_v, "vv*V8cii", "n") -BUILTIN(__builtin_neon_vst2q_v, "vv*V16cV16ci", "n") -BUILTIN(__builtin_neon_vst2_v, "vv*V8cV8ci", "n") -BUILTIN(__builtin_neon_vst2q_lane_v, "vv*V16cV16cii", "n") -BUILTIN(__builtin_neon_vst2_lane_v, "vv*V8cV8cii", "n") -BUILTIN(__builtin_neon_vst3q_v, "vv*V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vst3_v, "vv*V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vst3q_lane_v, "vv*V16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vst3_lane_v, "vv*V8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vst4q_v, "vv*V16cV16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vst4_v, "vv*V8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vst4q_lane_v, "vv*V16cV16cV16cV16cii", "n") -BUILTIN(__builtin_neon_vst4_lane_v, "vv*V8cV8cV8cV8cii", "n") -BUILTIN(__builtin_neon_vsubhn_v, "V8cV16cV16ci", "n") -BUILTIN(__builtin_neon_vsubl_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vsubw_v, "V16cV16cV8ci", "n") -BUILTIN(__builtin_neon_vtbl1_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtbl2_v, "V8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtbl3_v, "V8cV8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtbl4_v, "V8cV8cV8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtbx1_v, "V8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtbx2_v, "V8cV8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtbx3_v, "V8cV8cV8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtbx4_v, "V8cV8cV8cV8cV8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtrn_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtrnq_v, "V32cV16cV16ci", "n") -BUILTIN(__builtin_neon_vtst_v, "V8cV8cV8ci", "n") -BUILTIN(__builtin_neon_vtstq_v, "V16cV16cV16ci", "n") -BUILTIN(__builtin_neon_vuzp_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vuzpq_v, "V32cV16cV16ci", "n") -BUILTIN(__builtin_neon_vzip_v, "V16cV8cV8ci", "n") -BUILTIN(__builtin_neon_vzipq_v, "V32cV16cV16ci", "n") +#define GET_NEON_BUILTINS +#include "clang/Basic/arm_neon.inc" +#undef GET_NEON_BUILTINS #undef BUILTIN diff --git a/include/clang/Basic/Makefile b/include/clang/Basic/Makefile index a1445ced32..f01ef10dbe 100644 --- a/include/clang/Basic/Makefile +++ b/include/clang/Basic/Makefile @@ -3,7 +3,7 @@ BUILT_SOURCES = DiagnosticAnalysisKinds.inc DiagnosticASTKinds.inc \ DiagnosticCommonKinds.inc DiagnosticDriverKinds.inc \ DiagnosticFrontendKinds.inc DiagnosticLexKinds.inc \ DiagnosticParseKinds.inc DiagnosticSemaKinds.inc \ - DiagnosticGroups.inc AttrList.inc + DiagnosticGroups.inc AttrList.inc arm_neon.inc TABLEGEN_INC_FILES_COMMON = 1 @@ -23,3 +23,7 @@ $(ObjDir)/AttrList.inc.tmp : Attr.td $(TBLGEN) $(ObjDir)/.dir $(Echo) "Building Clang attribute list with tblgen" $(Verb) $(TableGen) -gen-clang-attr-list -o $(call SYSPATH, $@) \ -I $(PROJ_SRC_DIR)/../.. $< + +$(ObjDir)/arm_neon.inc.tmp : arm_neon.td $(TBLGEN) $(ObjDir)/.dir + $(Echo) "Building Clang arm_neon.inc with tblgen" + $(Verb) $(TableGen) -gen-arm-neon-sema -o $(call SYSPATH, $@) $< diff --git a/lib/Headers/arm_neon.td b/include/clang/Basic/arm_neon.td similarity index 100% rename from lib/Headers/arm_neon.td rename to include/clang/Basic/arm_neon.td diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt index 7942df9679..883b60a2a6 100644 --- a/lib/Headers/CMakeLists.txt +++ b/lib/Headers/CMakeLists.txt @@ -23,7 +23,7 @@ endif () # Generate arm_neon.h set(LLVM_TARGET_DEFINITIONS arm_neon.td) -tablegen(arm_neon.h.inc -gen-arm-neon-header) +tablegen(arm_neon.h.inc -gen-arm-neon) add_custom_target(ClangARMNeon DEPENDS arm_neon.h.inc) add_custom_command(OUTPUT ${output_dir}/arm_neon.h diff --git a/lib/Headers/Makefile b/lib/Headers/Makefile index c93294a8b3..79c5b3a2d9 100644 --- a/lib/Headers/Makefile +++ b/lib/Headers/Makefile @@ -47,6 +47,6 @@ $(INSTHEADERS): $(PROJ_headers)/%.h: $(HeaderDir)/%.h | $(PROJ_headers) install-local:: $(INSTHEADERS) -$(ObjDir)/arm_neon.h.inc.tmp : arm_neon.td $(TBLGEN) $(ObjDir)/.dir +$(ObjDir)/arm_neon.h.inc.tmp : $(CLANG_LEVEL)/include/clang/Basic/arm_neon.td $(TBLGEN) $(ObjDir)/.dir $(Echo) "Building Clang arm_neon.h.inc with tblgen" - $(Verb) $(TableGen) -gen-arm-neon-header -o $(call SYSPATH, $@) $< + $(Verb) $(TableGen) -gen-arm-neon -o $(call SYSPATH, $@) $< diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 3a5afce920..4ded4ef163 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -277,199 +277,9 @@ bool Sema::CheckARMBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { unsigned mask = 0; unsigned TV = 0; switch (BuiltinID) { - case ARM::BI__builtin_neon_vaba_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vabaq_v: mask = 0x7070000; break; - case ARM::BI__builtin_neon_vabal_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vabd_v: mask = 0x717; break; - case ARM::BI__builtin_neon_vabdq_v: mask = 0x7170000; break; - case ARM::BI__builtin_neon_vabdl_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vabs_v: mask = 0x17; break; - case ARM::BI__builtin_neon_vabsq_v: mask = 0x170000; break; - case ARM::BI__builtin_neon_vaddhn_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vaddl_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vaddw_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vcage_v: mask = 0x400; break; - case ARM::BI__builtin_neon_vcageq_v: mask = 0x4000000; break; - case ARM::BI__builtin_neon_vcagt_v: mask = 0x400; break; - case ARM::BI__builtin_neon_vcagtq_v: mask = 0x4000000; break; - case ARM::BI__builtin_neon_vcale_v: mask = 0x400; break; - case ARM::BI__builtin_neon_vcaleq_v: mask = 0x4000000; break; - case ARM::BI__builtin_neon_vcalt_v: mask = 0x400; break; - case ARM::BI__builtin_neon_vcaltq_v: mask = 0x4000000; break; - case ARM::BI__builtin_neon_vcls_v: mask = 0x7; break; - case ARM::BI__builtin_neon_vclsq_v: mask = 0x70000; break; - case ARM::BI__builtin_neon_vclz_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vclzq_v: mask = 0x7070000; break; - case ARM::BI__builtin_neon_vcnt_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vcntq_v: mask = 0x1210000; break; - case ARM::BI__builtin_neon_vcvt_f16_v: mask = 0x80; break; - case ARM::BI__builtin_neon_vcvt_f32_v: mask = 0x404; break; - case ARM::BI__builtin_neon_vcvtq_f32_v: mask = 0x4040000; break; - case ARM::BI__builtin_neon_vcvt_f32_f16: mask = 0x100000; break; - case ARM::BI__builtin_neon_vcvt_n_f32_v: mask = 0x404; break; - case ARM::BI__builtin_neon_vcvtq_n_f32_v: mask = 0x4040000; break; - case ARM::BI__builtin_neon_vcvt_n_s32_v: mask = 0x4; break; - case ARM::BI__builtin_neon_vcvtq_n_s32_v: mask = 0x40000; break; - case ARM::BI__builtin_neon_vcvt_n_u32_v: mask = 0x400; break; - case ARM::BI__builtin_neon_vcvtq_n_u32_v: mask = 0x4000000; break; - case ARM::BI__builtin_neon_vcvt_s32_v: mask = 0x4; break; - case ARM::BI__builtin_neon_vcvtq_s32_v: mask = 0x40000; break; - case ARM::BI__builtin_neon_vcvt_u32_v: mask = 0x400; break; - case ARM::BI__builtin_neon_vcvtq_u32_v: mask = 0x4000000; break; - case ARM::BI__builtin_neon_vext_v: mask = 0xF6F; break; - case ARM::BI__builtin_neon_vextq_v: mask = 0xF6F0000; break; - case ARM::BI__builtin_neon_vhadd_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vhaddq_v: mask = 0x7070000; break; - case ARM::BI__builtin_neon_vhsub_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vhsubq_v: mask = 0x7070000; break; - case ARM::BI__builtin_neon_vld1_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld1q_v: mask = 0xFFF0000; break; - case ARM::BI__builtin_neon_vld1_dup_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld1q_dup_v: mask = 0xFFF0000; break; - case ARM::BI__builtin_neon_vld1_lane_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld1q_lane_v: mask = 0xFFF0000; break; - case ARM::BI__builtin_neon_vld2_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld2q_v: mask = 0x7F70000; break; - case ARM::BI__builtin_neon_vld2_dup_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld2_lane_v: mask = 0x7F7; break; - case ARM::BI__builtin_neon_vld2q_lane_v: mask = 0x6D60000; break; - case ARM::BI__builtin_neon_vld3_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld3q_v: mask = 0x7F70000; break; - case ARM::BI__builtin_neon_vld3_dup_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld3_lane_v: mask = 0x7F7; break; - case ARM::BI__builtin_neon_vld3q_lane_v: mask = 0x6D60000; break; - case ARM::BI__builtin_neon_vld4_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld4q_v: mask = 0x7F70000; break; - case ARM::BI__builtin_neon_vld4_dup_v: mask = 0xFFF; break; - case ARM::BI__builtin_neon_vld4_lane_v: mask = 0x7F7; break; - case ARM::BI__builtin_neon_vld4q_lane_v: mask = 0x6D60000; break; - case ARM::BI__builtin_neon_vmax_v: mask = 0x717; break; - case ARM::BI__builtin_neon_vmaxq_v: mask = 0x7170000; break; - case ARM::BI__builtin_neon_vmin_v: mask = 0x717; break; - case ARM::BI__builtin_neon_vminq_v: mask = 0x7170000; break; - case ARM::BI__builtin_neon_vmlal_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vmlal_lane_v: mask = 0xC0C0000; break; - case ARM::BI__builtin_neon_vmla_lane_v: mask = 0x616; break; - case ARM::BI__builtin_neon_vmlaq_lane_v: mask = 0x6160000; break; - case ARM::BI__builtin_neon_vmlsl_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vmlsl_lane_v: mask = 0xC0C0000; break; - case ARM::BI__builtin_neon_vmls_lane_v: mask = 0x616; break; - case ARM::BI__builtin_neon_vmlsq_lane_v: mask = 0x6160000; break; - case ARM::BI__builtin_neon_vmovl_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vmovn_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vmull_v: mask = 0xE4E0000; break; - case ARM::BI__builtin_neon_vmull_lane_v: mask = 0xC0C0000; break; - case ARM::BI__builtin_neon_vpadal_v: mask = 0xE0E; break; - case ARM::BI__builtin_neon_vpadalq_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vpadd_v: mask = 0x717; break; - case ARM::BI__builtin_neon_vpaddl_v: mask = 0xE0E; break; - case ARM::BI__builtin_neon_vpaddlq_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vpmax_v: mask = 0x717; break; - case ARM::BI__builtin_neon_vpmin_v: mask = 0x717; break; - case ARM::BI__builtin_neon_vqabs_v: mask = 0x7; break; - case ARM::BI__builtin_neon_vqabsq_v: mask = 0x70000; break; - case ARM::BI__builtin_neon_vqadd_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vqaddq_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vqdmlal_v: mask = 0xC0000; break; - case ARM::BI__builtin_neon_vqdmlal_lane_v: mask = 0xC0000; break; - case ARM::BI__builtin_neon_vqdmlsl_v: mask = 0xC0000; break; - case ARM::BI__builtin_neon_vqdmlsl_lane_v: mask = 0xC0000; break; - case ARM::BI__builtin_neon_vqdmulh_v: mask = 0x6; break; - case ARM::BI__builtin_neon_vqdmulhq_v: mask = 0x60000; break; - case ARM::BI__builtin_neon_vqdmulh_lane_v: mask = 0x6; break; - case ARM::BI__builtin_neon_vqdmulhq_lane_v: mask = 0x60000; break; - case ARM::BI__builtin_neon_vqdmull_v: mask = 0xC0000; break; - case ARM::BI__builtin_neon_vqdmull_lane_v: mask = 0xC0000; break; - case ARM::BI__builtin_neon_vqmovn_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vqmovun_v: mask = 0x700; break; - case ARM::BI__builtin_neon_vqneg_v: mask = 0x7; break; - case ARM::BI__builtin_neon_vqnegq_v: mask = 0x70000; break; - case ARM::BI__builtin_neon_vqrdmulh_v: mask = 0x6; break; - case ARM::BI__builtin_neon_vqrdmulhq_v: mask = 0x60000; break; - case ARM::BI__builtin_neon_vqrdmulh_lane_v: mask = 0x6; break; - case ARM::BI__builtin_neon_vqrdmulhq_lane_v: mask = 0x60000; break; - case ARM::BI__builtin_neon_vqrshl_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vqrshlq_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vqrshrn_n_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vqrshrun_n_v: mask = 0x700; break; - case ARM::BI__builtin_neon_vqshl_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vqshlq_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vqshlu_n_v: mask = 0xF00; break; - case ARM::BI__builtin_neon_vqshluq_n_v: mask = 0xF000000; break; - case ARM::BI__builtin_neon_vqshl_n_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vqshlq_n_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vqshrn_n_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vqshrun_n_v: mask = 0x700; break; - case ARM::BI__builtin_neon_vqsub_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vqsubq_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vraddhn_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vrecpe_v: mask = 0x410; break; - case ARM::BI__builtin_neon_vrecpeq_v: mask = 0x4100000; break; - case ARM::BI__builtin_neon_vrecps_v: mask = 0x10; break; - case ARM::BI__builtin_neon_vrecpsq_v: mask = 0x100000; break; - case ARM::BI__builtin_neon_vrhadd_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vrhaddq_v: mask = 0x7070000; break; - case ARM::BI__builtin_neon_vrshl_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vrshlq_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vrshrn_n_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vrshr_n_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vrshrq_n_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vrsqrte_v: mask = 0x410; break; - case ARM::BI__builtin_neon_vrsqrteq_v: mask = 0x4100000; break; - case ARM::BI__builtin_neon_vrsqrts_v: mask = 0x10; break; - case ARM::BI__builtin_neon_vrsqrtsq_v: mask = 0x100000; break; - case ARM::BI__builtin_neon_vrsra_n_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vrsraq_n_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vrsubhn_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vshl_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vshlq_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vshll_n_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vshl_n_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vshlq_n_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vshrn_n_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vshr_n_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vshrq_n_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vsli_n_v: mask = 0xF6F; break; - case ARM::BI__builtin_neon_vsliq_n_v: mask = 0xF6F0000; break; - case ARM::BI__builtin_neon_vsra_n_v: mask = 0xF0F; break; - case ARM::BI__builtin_neon_vsraq_n_v: mask = 0xF0F0000; break; - case ARM::BI__builtin_neon_vsri_n_v: mask = 0xF6F; break; - case ARM::BI__builtin_neon_vsriq_n_v: mask = 0xF6F0000; break; - case ARM::BI__builtin_neon_vst1_v: mask = 0x9F; break; - case ARM::BI__builtin_neon_vst1q_v: mask = 0x9F0000; break; - case ARM::BI__builtin_neon_vst1_lane_v: mask = 0x9F; break; - case ARM::BI__builtin_neon_vst1q_lane_v: mask = 0x9F0000; break; - case ARM::BI__builtin_neon_vst2_v: mask = 0x9F; break; - case ARM::BI__builtin_neon_vst2q_v: mask = 0x970000; break; - case ARM::BI__builtin_neon_vst2_lane_v: mask = 0x97; break; - case ARM::BI__builtin_neon_vst2q_lane_v: mask = 0x960000; break; - case ARM::BI__builtin_neon_vst3_v: mask = 0x9F; break; - case ARM::BI__builtin_neon_vst3q_v: mask = 0x970000; break; - case ARM::BI__builtin_neon_vst3_lane_v: mask = 0x97; break; - case ARM::BI__builtin_neon_vst3q_lane_v: mask = 0x960000; break; - case ARM::BI__builtin_neon_vst4_v: mask = 0x9F; break; - case ARM::BI__builtin_neon_vst4q_v: mask = 0x970000; break; - case ARM::BI__builtin_neon_vst4_lane_v: mask = 0x97; break; - case ARM::BI__builtin_neon_vst4q_lane_v: mask = 0x960000; break; - case ARM::BI__builtin_neon_vsubhn_v: mask = 0x707; break; - case ARM::BI__builtin_neon_vsubl_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vsubw_v: mask = 0xE0E0000; break; - case ARM::BI__builtin_neon_vtbl1_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtbl2_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtbl3_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtbl4_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtbx1_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtbx2_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtbx3_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtbx4_v: mask = 0x121; break; - case ARM::BI__builtin_neon_vtrn_v: mask = 0x777; break; - case ARM::BI__builtin_neon_vtrnq_v: mask = 0x7770000; break; - case ARM::BI__builtin_neon_vtst_v: mask = 0x700; break; - case ARM::BI__builtin_neon_vtstq_v: mask = 0x7000000; break; - case ARM::BI__builtin_neon_vuzp_v: mask = 0x777; break; - case ARM::BI__builtin_neon_vuzpq_v: mask = 0x7770000; break; - case ARM::BI__builtin_neon_vzip_v: mask = 0x373; break; - case ARM::BI__builtin_neon_vzipq_v: mask = 0x7770000; break; +#define GET_NEON_OVERLOAD_CHECK +#include "clang/Basic/arm_neon.inc" +#undef GET_NEON_OVERLOAD_CHECK } // For NEON intrinsics which are overloaded on vector element type, validate @@ -490,89 +300,9 @@ bool Sema::CheckARMBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { unsigned i = 0, l = 0, u = 0; switch (BuiltinID) { default: return false; - case ARM::BI__builtin_neon_vcvt_n_f32_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vcvtq_n_f32_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vcvt_n_s32_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vcvtq_n_s32_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vcvt_n_u32_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vcvtq_n_u32_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vext_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vextq_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vget_lane_i8: i = 1; u = 7; break; - case ARM::BI__builtin_neon_vget_lane_i16: i = 1; u = 3; break; - case ARM::BI__builtin_neon_vget_lane_i32: i = 1; u = 1; break; - case ARM::BI__builtin_neon_vget_lane_f32: i = 1; u = 1; break; - case ARM::BI__builtin_neon_vgetq_lane_i8: i = 1; u = 15; break; - case ARM::BI__builtin_neon_vgetq_lane_i16: i = 1; u = 7; break; - case ARM::BI__builtin_neon_vgetq_lane_i32: i = 1; u = 3; break; - case ARM::BI__builtin_neon_vgetq_lane_f32: i = 1; u = 3; break; - case ARM::BI__builtin_neon_vget_lane_i64: i = 1; u = 0; break; - case ARM::BI__builtin_neon_vgetq_lane_i64: i = 1; u = 1; break; - case ARM::BI__builtin_neon_vld1q_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vld1_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vld2q_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vld2_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vld3q_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vld3_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vld4q_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vld4_lane_v: i = 1; u = RFT(TV); break; - case ARM::BI__builtin_neon_vmlal_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vmla_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vmlaq_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vmlsl_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vmls_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vmlsq_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vmull_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqdmlal_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqdmlsl_lane_v: i = 3; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqdmulh_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqdmulhq_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqdmull_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqrdmulh_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqrdmulhq_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vqrshrn_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vqrshrun_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vqshlu_n_v: i = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vqshluq_n_v: i = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vqshl_n_v: i = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vqshlq_n_v: i = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vqshrn_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vqshrun_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vrshrn_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vrshr_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vrshrq_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vrsra_n_v: i = 2; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vrsraq_n_v: i = 2; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vset_lane_i8: i = 2; u = 7; break; - case ARM::BI__builtin_neon_vset_lane_i16: i = 2; u = 3; break; - case ARM::BI__builtin_neon_vset_lane_i32: i = 2; u = 1; break; - case ARM::BI__builtin_neon_vset_lane_f32: i = 2; u = 1; break; - case ARM::BI__builtin_neon_vsetq_lane_i8: i = 2; u = 15; break; - case ARM::BI__builtin_neon_vsetq_lane_i16: i = 2; u = 7; break; - case ARM::BI__builtin_neon_vsetq_lane_i32: i = 2; u = 3; break; - case ARM::BI__builtin_neon_vsetq_lane_f32: i = 2; u = 3; break; - case ARM::BI__builtin_neon_vset_lane_i64: i = 2; u = 0; break; - case ARM::BI__builtin_neon_vsetq_lane_i64: i = 2; u = 1; break; - case ARM::BI__builtin_neon_vshll_n_v: i = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vshl_n_v: i = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vshlq_n_v: i = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vshrn_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vshr_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vshrq_n_v: i = 1; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vsli_n_v: i = 2; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vsliq_n_v: i = 2; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vsra_n_v: i = 2; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vsraq_n_v: i = 2; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vsri_n_v: i = 2; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vsriq_n_v: i = 2; l = 1; u = RFT(TV, true); break; - case ARM::BI__builtin_neon_vst1q_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vst1_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vst2q_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vst2_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vst3q_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vst3_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vst4q_lane_v: i = 2; u = RFT(TV); break; - case ARM::BI__builtin_neon_vst4_lane_v: i = 2; u = RFT(TV); break; +#define GET_NEON_IMMEDIATE_CHECK +#include "clang/Basic/arm_neon.inc" +#undef GET_NEON_IMMEDIATE_CHECK }; // Check that the immediate argument is actually a constant. -- 2.40.0