[llvm] r299531 - [AArch64] Crypto requires FP.

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 03:44:38 PDT 2017


Author: jamesm
Date: Wed Apr  5 05:44:38 2017
New Revision: 299531

URL: http://llvm.org/viewvc/llvm-project?rev=299531&view=rev
Log:
[AArch64] Crypto requires FP.

So if FP is disabled, crypto should also be disabled.

Added:
    llvm/trunk/test/MC/AArch64/nofp-crypto-diagnostic.s
Modified:
    llvm/trunk/lib/Target/AArch64/AArch64.td

Modified: llvm/trunk/lib/Target/AArch64/AArch64.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64.td?rev=299531&r1=299530&r2=299531&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64.td (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64.td Wed Apr  5 05:44:38 2017
@@ -27,7 +27,7 @@ def FeatureNEON : SubtargetFeature<"neon
   "Enable Advanced SIMD instructions", [FeatureFPARMv8]>;
 
 def FeatureCrypto : SubtargetFeature<"crypto", "HasCrypto", "true",
-  "Enable cryptographic instructions">;
+  "Enable cryptographic instructions", [FeatureNEON]>;
 
 def FeatureCRC : SubtargetFeature<"crc", "HasCRC", "true",
   "Enable ARMv8 CRC-32 checksum instructions">;

Added: llvm/trunk/test/MC/AArch64/nofp-crypto-diagnostic.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AArch64/nofp-crypto-diagnostic.s?rev=299531&view=auto
==============================================================================
--- llvm/trunk/test/MC/AArch64/nofp-crypto-diagnostic.s (added)
+++ llvm/trunk/test/MC/AArch64/nofp-crypto-diagnostic.s Wed Apr  5 05:44:38 2017
@@ -0,0 +1,8 @@
+// RUN: not llvm-mc  -triple aarch64-none-linux-gnu -mattr=+neon,+crypto,-fp-armv8 < %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-ERROR < %t %s
+
+        sha1h s0, s1
+
+// CHECK-ERROR: error: instruction requires: crypto
+// CHECK-ERROR-NEXT:    sha1h s0, s1
+// CHECK-ERROR-NEXT:    ^




More information about the llvm-commits mailing list