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 $ecx killed $ecx def $rcx
11 ; CHECK-NEXT: # kill: def $edx killed $edx def $rdx
12 ; CHECK-NEXT: # kill: def $esi killed $esi def $rsi
13 ; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
14 ; CHECK-NEXT: movl %esi, -{{[0-9]+}}(%rsp)
15 ; CHECK-NEXT: movl %ecx, -{{[0-9]+}}(%rsp)
16 ; CHECK-NEXT: movl %edi, -{{[0-9]+}}(%rsp)
17 ; CHECK-NEXT: movl %edx, -{{[0-9]+}}(%rsp)
18 ; CHECK-NEXT: addl %edi, %esi
19 ; CHECK-NEXT: leal (%rdx,%rcx), %eax
20 ; CHECK-NEXT: addl %esi, %eax
31 %l0 = load i32, ptr %a0
32 %l1 = load i32, ptr %a1
33 %l2 = load i32, ptr %a2
34 %l3 = load i32, ptr %a3
35 %add0 = add nsw i32 %l0, %l1
36 %add1 = add nsw i32 %add0, %l2
37 %add2 = add nsw i32 %add1, %l3