1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck %s
4 ; We should be able to bypass the load values to their corresponding
7 define i32 @foo(i32 %a, i32 %b, i32 %c, i32 %d) {
9 ; CHECK: # %bb.0: # %entry
10 ; CHECK-NEXT: # kill: def $esi killed $esi def $rsi
11 ; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
12 ; CHECK-NEXT: movl %esi, -{{[0-9]+}}(%rsp)
13 ; CHECK-NEXT: movl %ecx, -{{[0-9]+}}(%rsp)
14 ; CHECK-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
15 ; CHECK-NEXT: movl %edx, -{{[0-9]+}}(%rsp)
16 ; CHECK-NEXT: leal (%rdi,%rsi), %eax
17 ; CHECK-NEXT: addl %edx, %eax
18 ; CHECK-NEXT: addl %ecx, %eax
29 %l0 = load i32, ptr %a0
30 %l1 = load i32, ptr %a1
31 %l2 = load i32, ptr %a2
32 %l3 = load i32, ptr %a3
33 %add0 = add nsw i32 %l0, %l1
34 %add1 = add nsw i32 %add0, %l2
35 %add2 = add nsw i32 %add1, %l3