59 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -relocation-model=pic -post-RA-scheduler=1 -break-anti-dependencies=critical | FileCheck %s3 4; PR20308 ( http://llvm.org/bugs/show_bug.cgi?id=20308 ).5; The critical-anti-dependency-breaker must not use register def information from a kill inst.6; This test case expects such an instruction to appear as a comment with def info for RDI.7; There is an anti-dependency (WAR) hazard using RAX using default reg allocation and scheduling.8; The post-RA-scheduler and critical-anti-dependency breaker can eliminate that hazard using R10.9; That is the first free register that isn't used as a param in the call to "@Image".10 11@PartClass = external global i3212@NullToken = external global i6413 14define i32 @Part_Create(ptr %Anchor, i32 %TypeNum, i32 %F, i32 %Z, ptr %Status, ptr %PartTkn) {15; CHECK-LABEL: Part_Create:16; CHECK: # %bb.0:17; CHECK-NEXT: pushq %rbp18; CHECK-NEXT: .cfi_def_cfa_offset 1619; CHECK-NEXT: pushq %rbx20; CHECK-NEXT: .cfi_def_cfa_offset 2421; CHECK-NEXT: subq $24, %rsp22; CHECK-NEXT: .cfi_def_cfa_offset 4823; CHECK-NEXT: .cfi_offset %rbx, -2424; CHECK-NEXT: .cfi_offset %rbp, -1625; CHECK-NEXT: movq NullToken@GOTPCREL(%rip), %rax26; CHECK-NEXT: movq PartClass@GOTPCREL(%rip), %r1027; CHECK-NEXT: xorl %edx, %edx28; CHECK-NEXT: xorl %ecx, %ecx29; CHECK-NEXT: movq %rdi, %rbx30; CHECK-NEXT: movq (%rax), %rax31; CHECK-NEXT: movl (%r10), %ebp32; CHECK-NEXT: movq %rax, {{[0-9]+}}(%rsp)33; CHECK-NEXT: leaq {{[0-9]+}}(%rsp), %rax34; CHECK-NEXT: movl %ebp, %esi35; CHECK-NEXT: movq %rax, (%rsp)36; CHECK-NEXT: callq Image@PLT37; CHECK-NEXT: movq %rbx, %rdi38; CHECK-NEXT: callq Create@PLT39; CHECK-NEXT: movl %ebp, %eax40; CHECK-NEXT: addq $24, %rsp41; CHECK-NEXT: .cfi_def_cfa_offset 2442; CHECK-NEXT: popq %rbx43; CHECK-NEXT: .cfi_def_cfa_offset 1644; CHECK-NEXT: popq %rbp45; CHECK-NEXT: .cfi_def_cfa_offset 846; CHECK-NEXT: retq47 %PartObj = alloca ptr, align 848 %Vchunk = alloca i64, align 849 %1 = load i64, ptr @NullToken, align 450 store i64 %1, ptr %Vchunk, align 851 %2 = load i32, ptr @PartClass, align 452 call i32 @Image(ptr %Anchor, i32 %2, i32 0, i32 0, ptr %Status, ptr %PartTkn, ptr %PartObj)53 call i32 @Create(ptr %Anchor)54 ret i32 %255}56 57declare i32 @Image(ptr, i32, i32, i32, ptr, ptr, ptr)58declare i32 @Create(ptr)59