[llvm] [ARM] Enable verifyInstructionPredicates (PR #139262)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 06:07:19 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-arm

Author: David Green (davemgreen)

<details>
<summary>Changes</summary>

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
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();

``````````

</details>


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


More information about the llvm-commits mailing list