[llvm] [clang] [SVE2.1][Clang][LLVM]Add 128bits builtin in Clang and LLVM intrinisc (PR #71930)
    Momchil Velikov via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed Nov 15 06:44:16 PST 2023
    
    
  
================
@@ -116,3 +116,9 @@ void test_svdot_lane_2way(svint32_t s32, svuint32_t u32, svint16_t s16, svuint16
   svdot_lane_u32_u16_u16(u32, u16, u16, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
   svdot_lane_f32_f16_f16(f32, f16, f16, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
 }
+
+__attribute__((target("+sve2p1")))
+void test_svextq_lane(svint16_t zn_i16, svint16_t zm_i16, svfloat16_t zn_f16, svfloat16_t zm_f16){
+  svextq_lane_s16(zn_i16, zm_i16, -1); // expected-error {{argument value -1 is outside the valid range [0, 15]}}
+  svextq_lane_f16(zn_f16, zm_f16, 16);  // expected-error {{argument value 16 is outside the valid range [0, 15]}}
+}
----------------
momchil-velikov wrote:
Also needs check fir the range of the lane argument for:
 * `svbool_t svpmov_lane[_u8](svuint8_t zn, uint64_t imm);`
 * `svuint16_t svpmov_lane[_u16]_m(svuint16_t zd, svbool_t pn, uint64_t imm);`
https://github.com/llvm/llvm-project/pull/71930
    
    
More information about the cfe-commits
mailing list