[llvm] [ARM] Ignore `ANNOTATION_LABEL` node in scheduler (PR #190499)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 4 18:54:36 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-selectiondag
@llvm/pr-subscribers-backend-arm
Author: Trung Nguyen (trungnt2910)
<details>
<summary>Changes</summary>
This fixes a crash in `clang` for `armv7` targets when optimizations are enabled.
Fixes #<!-- -->190497
---
Full diff: https://github.com/llvm/llvm-project/pull/190499.diff
2 Files Affected:
- (modified) llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (+1)
- (added) llvm/test/CodeGen/ARM/pr190497.ll (+13)
``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 12fc26d949581..bc747d250afae 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -712,6 +712,7 @@ void ScheduleDAGRRList::EmitNode(SUnit *SU) {
case ISD::CopyToReg:
case ISD::CopyFromReg:
case ISD::EH_LABEL:
+ case ISD::ANNOTATION_LABEL:
// Noops don't affect the scoreboard state. Copies are likely to be
// removed.
return;
diff --git a/llvm/test/CodeGen/ARM/pr190497.ll b/llvm/test/CodeGen/ARM/pr190497.ll
new file mode 100644
index 0000000000000..8d852819a09de
--- /dev/null
+++ b/llvm/test/CodeGen/ARM/pr190497.ll
@@ -0,0 +1,13 @@
+; RUN: llc -mtriple=thumbv7-windows-msvc -O1 < %s
+
+; No check in a crash test
+
+declare void @llvm.codeview.annotation(metadata)
+
+define void @foo() {
+entry:
+ call void @llvm.codeview.annotation(metadata !0)
+ ret void
+}
+
+!0 = !{!"annotation"}
``````````
</details>
https://github.com/llvm/llvm-project/pull/190499
More information about the llvm-commits
mailing list