In http://reviews.llvm.org/D7951#131439, @nemanjai wrote:
> Note to reviewers: There is currently no macro guard for the builtins that do
> not require Cagegory:Vector.Crypto. However, the back end will not generate
> code for them on older CPU's. Perhaps I should guard those with
> __POWER8_VECTOR__ macro. However, this would imply that -mcrypto needs to
> imply -mpower8-vector which is probably the correct thing to do since
> Category:Vector.Crypto is a subset of Category:Vector.
> I can make these changes and upload a revision if everyone agrees with this
> approach.
Why don't we guard them all with __CRYPTO__? It seems somewhat odd to have
some, but not all, of the __builtin_crypto_* available when the crypto feature
is disabled.
REPOSITORY
rL LLVM
================
Comment at: lib/CodeGen/CGBuiltin.cpp:6358
@@ +6357,3 @@
+ if (CI1->getZExtValue() > 1) {
+ CGM.Error(E->getArg(1)->getExprLoc(), "argument out of range (should be
0-1).");
+ return llvm::UndefValue::get(Ops[0]->getType());
----------------
Line too long?
================
Comment at: lib/CodeGen/CGBuiltin.cpp:6362
@@ +6361,3 @@
+ if (CI2->getZExtValue() > 15) {
+ CGM.Error(E->getArg(2)->getExprLoc(), "argument out of range (should be
0-15).");
+ return llvm::UndefValue::get(Ops[0]->getType());
----------------
Line too long?
http://reviews.llvm.org/D7951
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits