diff --git a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h --- a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -343,7 +343,8 @@ : Name(N), Encoding(E), FeaturesRequired(F) {} bool haveFeatures(FeatureBitset ActiveFeatures) const { - return (FeaturesRequired & ActiveFeatures) == FeaturesRequired; + return ActiveFeatures[llvm::AArch64::FeatureAll] || + (FeaturesRequired & ActiveFeatures) == FeaturesRequired; } FeatureBitset getRequiredFeatures() const { return FeaturesRequired; } diff --git a/llvm/test/MC/Disassembler/AArch64/mattr-all.txt b/llvm/test/MC/Disassembler/AArch64/mattr-all.txt --- a/llvm/test/MC/Disassembler/AArch64/mattr-all.txt +++ b/llvm/test/MC/Disassembler/AArch64/mattr-all.txt @@ -35,3 +35,7 @@ ## armv9a rme # CHECK: mrs x0, MFAR_EL3 [0xa0,0x60,0x3e,0xd5] + +## predres (to make sure sysreg aliases work) +# CHECK: cfp rctx, x0 +[0x80,0x73,0x0b,0xd5]