1 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s
4 define i32 @test1(i32 %x) nounwind {
6 %tmp2 = add i32 %tmp1, 7
9 ; CHECK: leal 7(,%r[[A0:di|cx]],8), %eax
13 ; ISel the add of -4 with a neg and use an lea for the rest of the
15 define i32 @test2(i32 %x_offs) nounwind readnone {
17 %t0 = icmp sgt i32 %x_offs, 4
18 br i1 %t0, label %bb.nph, label %bb2
21 %tmp = add i32 %x_offs, -5
22 %tmp6 = lshr i32 %tmp, 2
23 %tmp7 = mul i32 %tmp6, -4
24 %tmp8 = add i32 %tmp7, %x_offs
25 %tmp9 = add i32 %tmp8, -4
31 ; CHECK: movl %e[[A0]], %eax
32 ; CHECK: addl $-5, %eax
33 ; CHECK: andl $-4, %eax
35 ; CHECK: leal -4(%r[[A0]],%rax), %eax