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 }