diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp --- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -6916,6 +6916,7 @@ ExpandCryptoAEK(*ArchInfo, RequestedExtensions); FeatureBitset Features = STI.getFeatureBits(); + setAvailableFeatures(ComputeAvailableFeatures(Features)); for (auto Name : RequestedExtensions) { bool EnableFeature = true; diff --git a/llvm/test/MC/AArch64/directive-arch-negative.s b/llvm/test/MC/AArch64/directive-arch-negative.s --- a/llvm/test/MC/AArch64/directive-arch-negative.s +++ b/llvm/test/MC/AArch64/directive-arch-negative.s @@ -36,9 +36,7 @@ # CHECK: error: instruction requires: ras # CHECK-NEXT: esb -// PR32873: without extra features, '.arch' is currently ignored. -// Add an unrelated feature to accept the directive. - .arch armv8+crc + .arch armv8 casa w5, w7, [x19] # CHECK: error: instruction requires: lse diff --git a/llvm/test/MC/AArch64/directive-arch.s b/llvm/test/MC/AArch64/directive-arch.s --- a/llvm/test/MC/AArch64/directive-arch.s +++ b/llvm/test/MC/AArch64/directive-arch.s @@ -8,9 +8,7 @@ # CHECK: aesd v0.16b, v2.16b # CHECK: eor v0.16b, v0.16b, v2.16b -// PR32873: without extra features, '.arch' is currently ignored. -// Add an unrelated feature to accept the directive. - .arch armv8.1-a+crypto + .arch armv8.1-a casa w5, w7, [x20] # CHECK: casa w5, w7, [x20]