[PATCH] D123605: [Sema][SVE2] Move/simplify Sema testing for SVE2 ACLE builtins

Rosie Sumpter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 28 04:30:38 PDT 2022


RosieSumpter added inline comments.


================
Comment at: clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_imm_n.cpp:25
+{
+  // expected-error-re at +1 3 {{argument value {{[0-9]+}} is outside the valid range [0, 7]}}
+  EXPAND_XZM_FUNC(SVE_ACLE_FUNC(svqshlu,_n_s8,,), pg, svundef_s8(), -1);
----------------
paulwalker-arm wrote:
> RosieSumpter wrote:
> > paulwalker-arm wrote:
> > > I've not seen this before, presumably it's short hand instead of needing to repeat multiple identical `expected-error` check lines?  If so, is it worth using this throughout the test files and essentially only require one `expected-error` per function or does this only work here because the `EXPAND...` macro emits its three function calls on the same line?
> > Yes it lets you specify how many times you expect the diagnostic to appear, but as you said it only works when the diagnostics are emitted on the same line so I'm not sure there's a way to reduce the number of `expected-error` lines any more than this
> OK, thanks for checking.  To be honest I'm not sure why we need the `EXPAND_XZM_FUNC` macro given `SVE_ACLE_FUNC` worked fine before.  To my eye it kind of ruins the flow, but hey-ho I'll not worry about it.
> 
> Assuming I've not screwed up I think you're missing tests for `SVE_ACLE_FUNC(svrshrnb,_n_s16,,)` and `SVE_ACLE_FUNC(svrshrnt,_n_s16,,)`.
I've removed the macro - agree that it ruins the flow


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123605/new/

https://reviews.llvm.org/D123605



More information about the cfe-commits mailing list