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