1 ; RUN: llc -O2 -mtriple=i686-- < %s | FileCheck %s
3 define i32* @fooOptnone(i32* %p, i32* %q, i32** %z) #0 {
7 %y = load i32*, i32** %z
11 %t2 = getelementptr i32, i32* %y, i32 1
12 %t3 = getelementptr i32, i32* %t2, i32 %t1
16 ; 'optnone' should use fast-isel which will not produce 'lea'.
17 ; CHECK-LABEL: fooOptnone:
22 define i32* @fooNormal(i32* %p, i32* %q, i32** %z) #1 {
24 %r = load i32, i32* %p
25 %s = load i32, i32* %q
26 %y = load i32*, i32** %z
30 %t2 = getelementptr i32, i32* %y, i32 1
31 %t3 = getelementptr i32, i32* %t2, i32 %t1
35 ; Normal ISel will produce 'lea'.
36 ; CHECK-LABEL: fooNormal:
41 attributes #0 = { nounwind optnone noinline }
42 attributes #1 = { nounwind }