[PATCH] D76678: [SveEmitter] Add range checks for immediates and predicate patterns.

Sjoerd Meijer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 24 13:28:39 PDT 2020


SjoerdMeijer added a comment.

Did a first scan, looks very reasonable, just some first nits/questions inlined.



================
Comment at: clang/include/clang/Basic/arm_sve.td:153
+}
+def ImmCheckPredicatePattern    : ImmCheckType<0>;  // 0..31
+def ImmCheck1_16                : ImmCheckType<1>;  // 1..16
----------------
would it make sense to call this `ImmCheck0_31`?


================
Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/negative/acle_sve_qdech.c:10
+{
+  return svqdech_pat_s16(op, SV_VL8, 0); // expected-error-re {{argument value {{[0-9]+}} is outside the valid range [1, 16]}}
+}
----------------
nit: why use a regexp for the argument value and not just its value?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76678





More information about the cfe-commits mailing list