1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s 3 4 declare void @free_v() 5 6 define void @f(i32* %x, i32 %c32, i32* %y) nounwind { 7 ; CHECK-LABEL: f: 8 ; CHECK: # %bb.0: # %entry 9 ; CHECK-NEXT: pushq %rbp 10 ; CHECK-NEXT: pushq %r14 11 ; CHECK-NEXT: pushq %rbx 12 ; CHECK-NEXT: movq %rdx, %r14 13 ; CHECK-NEXT: movl %esi, %ebp 14 ; CHECK-NEXT: movl (%rdi), %ebx 15 ; CHECK-NEXT: callq free_v 16 ; CHECK-NEXT: testl %ebp, %ebp 17 ; CHECK-NEXT: je .LBB0_2 18 ; CHECK-NEXT: # %bb.1: # %left 19 ; CHECK-NEXT: movl %ebx, (%r14) 20 ; CHECK-NEXT: .LBB0_2: # %merge 21 ; CHECK-NEXT: popq %rbx 22 ; CHECK-NEXT: popq %r14 23 ; CHECK-NEXT: popq %rbp 24 ; CHECK-NEXT: retq 25 entry: 26 %v = load i32, i32* %x, !invariant.load !0 27 call void @free_v() 28 %c = icmp ne i32 %c32, 0 29 br i1 %c, label %left, label %merge 30 31 left: 32 store i32 %v, i32* %y 33 br label %merge 34 35 merge: 36 ret void 37 } 38 39 !0 = !{} 40