Skip to content

[ARM] Enable verifyInstructionPredicates #139262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2025

Conversation

davemgreen
Copy link
Collaborator

All the tests pass and a bootstrap and run of the llvm-test-suite passed successfully. Enable verifyInstructionPredicates so that instructions which are invalid with the current set of features produces an error.

All the tests pass and a bootstrap and run of the llvm-test-suite passed
successfully. Enable verifyInstructionPredicates so that instructions which are
invalid with the current set of features produces an error.
@llvmbot
Copy link
Member

llvmbot commented May 9, 2025

@llvm/pr-subscribers-backend-arm

Author: David Green (davemgreen)

Changes

All the tests pass and a bootstrap and run of the llvm-test-suite passed successfully. Enable verifyInstructionPredicates so that instructions which are invalid with the current set of features produces an error.


Full diff: https://github.com/llvm/llvm-project/pull/139262.diff

1 Files Affected:

  • (modified) llvm/lib/Target/ARM/ARMAsmPrinter.cpp (+2-3)
diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
index b71a1faa0d520..2505a67727aad 100644
--- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -1442,9 +1442,8 @@ void ARMAsmPrinter::EmitUnwindingInstruction(const MachineInstr *MI) {
 #include "ARMGenMCPseudoLowering.inc"
 
 void ARMAsmPrinter::emitInstruction(const MachineInstr *MI) {
-  // TODOD FIXME: Enable feature predicate checks once all the test pass.
-  // ARM_MC::verifyInstructionPredicates(MI->getOpcode(),
-  //                                   getSubtargetInfo().getFeatureBits());
+  ARM_MC::verifyInstructionPredicates(MI->getOpcode(),
+                                      getSubtargetInfo().getFeatureBits());
 
   const DataLayout &DL = getDataLayout();
   MCTargetStreamer &TS = *OutStreamer->getTargetStreamer();

Copy link
Collaborator

@ostannard ostannard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davemgreen
Copy link
Collaborator Author

Thanks.

Lets give this a go and see how it does. Please report any issues it finds.

@davemgreen davemgreen merged commit 3c03108 into llvm:main May 12, 2025
11 of 13 checks passed
@davemgreen davemgreen deleted the gh-arm-verifyInstructionPredicates branch May 12, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants