[PATCH] [PPC] Move argument range checks for HTM and crypto builtins to Sema

Richard Smith richard at metafoo.co.uk
Fri Mar 27 16:39:45 PDT 2015


Some tiny nits, but this looks basically fine to me too. Thanks for following up on this!


================
Comment at: lib/Sema/SemaChecking.cpp:910-911
@@ +909,4 @@
+  case PPC::BI__builtin_altivec_crypto_vshasigmad:
+    return (SemaBuiltinConstantArgRange(TheCall, 1, 0, 1) ||
+            SemaBuiltinConstantArgRange(TheCall, 2, 0, 15));
+  case PPC::BI__builtin_tbegin:
----------------
Parens not necessary here.

================
Comment at: lib/Sema/SemaChecking.cpp:919-920
@@ +918,4 @@
+  case PPC::BI__builtin_tabortdci:
+    return (SemaBuiltinConstantArgRange(TheCall, 0, 0, 31) ||
+            SemaBuiltinConstantArgRange(TheCall, 2, 0, 31));
+  }
----------------
... or here.

http://reviews.llvm.org/D8672

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list