Skip to content

Commit fcc82cf

Browse files
committed
[LoongArch] Precommit test case to show bug in LoongArchISelDagToDag
The optimization level should not be restored into O2.
1 parent ca4dfca commit fcc82cf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; REQUIRES: asserts
2+
; RUN: llc %s -O0 -mtriple=loongarch64 -o /dev/null -debug-only=isel 2>&1 | FileCheck %s
3+
4+
define void @fooOptnone() #0 {
5+
; CHECK: Changing optimization level for Function fooOptnone
6+
; CHECK: Before: -O2 ; After: -O0
7+
8+
; CHECK: Restoring optimization level for Function fooOptnone
9+
; CHECK: Before: -O0 ; After: -O2
10+
ret void
11+
}
12+
13+
attributes #0 = { nounwind optnone noinline }

0 commit comments

Comments
 (0)