Skip to content

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