1; REQUIRES: asserts
2; RUN: llc < %s -O0 -mtriple=riscv64 -debug-only=isel 2>&1 | FileCheck %s
3
4define i32* @fooOptnone(i32* %p, i32* %q, i32** %z) #0 {
5; CHECK: Changing optimization level for Function fooOptnone
6; CHECL: Before: -O2 ; After: -O0
7
8; CHECK: Restoring optimization level for Function fooOptnone
9; CHECK: Before: -O0 ; After: -O2
10entry:
11  %r = load i32, i32* %p
12  %s = load i32, i32* %q
13  %y = load i32*, i32** %z
14
15  %t0 = add i32 %r, %s
16  %t1 = add i32 %t0, 1
17  %t2 = getelementptr i32, i32* %y, i32 1
18  %t3 = getelementptr i32, i32* %t2, i32 %t1
19
20  ret i32* %t3
21
22}
23
24attributes #0 = { nounwind optnone noinline }
25