1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-linux | FileCheck %s --check-prefix=X32
3 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s --check-prefix=X64
4 ; RUN: llc < %s -mtriple=x86_64-linux-gnux32 | FileCheck %s --check-prefix=X64
5 ; RUN: llc < %s -mtriple=x86_64-nacl | FileCheck %s --check-prefix=X64
7 ; The computation of %t4 should match a single lea, without using actual add instructions.
9 define i32 @test1(i32 %A, i32 %B) {
12 ; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
13 ; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
14 ; X32-NEXT: leal -5(%ecx,%eax,4), %eax
19 ; X64-NEXT: # kill: def $esi killed $esi def $rsi
20 ; X64-NEXT: # kill: def $edi killed $edi def $rdi
21 ; X64-NEXT: leal -5(%rsi,%rdi,4), %eax
25 %t4 = add i32 %t3, %t1