Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -relocation-model=pic -post-RA-scheduler=1 -break-anti-dependencies=critical  | FileCheck %s
      2 
      3 ; PR20308 ( http://llvm.org/bugs/show_bug.cgi?id=20308 )
      4 ; The critical-anti-dependency-breaker must not use register def information from a kill inst.
      5 ; This test case expects such an instruction to appear as a comment with def info for RDI.
      6 ; There is an anti-dependency (WAR) hazard using RAX using default reg allocation and scheduling.
      7 ; The post-RA-scheduler and critical-anti-dependency breaker can eliminate that hazard using R10.
      8 ; That is the first free register that isn't used as a param in the call to "@Image".
      9 
     10 @PartClass = external global i32
     11 @NullToken = external global i64
     12 
     13 ; CHECK-LABEL: Part_Create:
     14 ; CHECK-DAG: # kill: RDI<def> 
     15 ; CHECK-DAG: movq PartClass@GOTPCREL(%rip), %r10
     16 define i32 @Part_Create(i64* %Anchor, i32 %TypeNum, i32 %F, i32 %Z, i32* %Status, i64* %PartTkn) {
     17   %PartObj = alloca i64*, align 8
     18   %Vchunk = alloca i64, align 8
     19   %1 = load i64, i64* @NullToken, align 4
     20   store i64 %1, i64* %Vchunk, align 8
     21   %2 = load i32, i32* @PartClass, align 4
     22   call i32 @Image(i64* %Anchor, i32 %2, i32 0, i32 0, i32* %Status, i64* %PartTkn, i64** %PartObj)
     23   call i32 @Create(i64* %Anchor)
     24   ret i32 %2
     25 }
     26 
     27 declare i32 @Image(i64*, i32, i32, i32, i32*, i64*, i64**)
     28 declare i32 @Create(i64*)
     29