Skip to content

release/20.x: [LoongArch] Precommit test case to show bug in LoongArchISelDagToDag #144296

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

Closed
wants to merge 1 commit into from

Conversation

llvmbot
Copy link
Member

@llvmbot llvmbot commented Jun 16, 2025

Backport fcc82cf

Requested by: @leecheechen

The optimization level should not be restored into O2.

(cherry picked from commit fcc82cf)
@llvmbot
Copy link
Member Author

llvmbot commented Jun 16, 2025

@llvm/pr-subscribers-backend-loongarch

Author: None (llvmbot)

Changes

Backport fcc82cf

Requested by: @leecheechen


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

1 Files Affected:

  • (added) llvm/test/CodeGen/LoongArch/isel-optnone.ll (+13)
diff --git a/llvm/test/CodeGen/LoongArch/isel-optnone.ll b/llvm/test/CodeGen/LoongArch/isel-optnone.ll
new file mode 100644
index 0000000000000..d44f1405d0c18
--- /dev/null
+++ b/llvm/test/CodeGen/LoongArch/isel-optnone.ll
@@ -0,0 +1,13 @@
+; REQUIRES: asserts
+; RUN: llc %s -O0 -mtriple=loongarch64 -o /dev/null -debug-only=isel 2>&1 | FileCheck %s
+
+define void @fooOptnone() #0 {
+; CHECK: Changing optimization level for Function fooOptnone
+; CHECK: Before: -O2 ; After: -O0
+
+; CHECK: Restoring optimization level for Function fooOptnone
+; CHECK: Before: -O0 ; After: -O2
+  ret void
+}
+
+attributes #0 = { nounwind optnone noinline }

@leecheechen
Copy link
Contributor

Close as it is redundant after #144299 has been created.

@nikic nikic moved this from Needs Triage to Done in LLVM Release Status Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants