brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 6e15d02 Raw
54 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=x86_64-unknown-unknown -x86-early-ifcvt -debug-only=early-ifcvt < %s 2>&1 | FileCheck %s3; REQUIRES: asserts4 5; This test case ensures that machine trace metrics properly calculates6; instructions heights and the trace's critical path for the entry block when7; MinInstr strategy is used. The behavior is demonstrated on early if conversion8; pass.9 10; CHECK: TBB: MinInstr trace %bb.0 --> %bb.0 --> %bb.2: 8 instrs. 30 cycles.11; CHECK: %bb.012; CHECK:     -> %bb.213 14; CHECK: FBB: MinInstr trace %bb.0 --> %bb.1 --> %bb.2: 10 instrs. 32 cycles.15; CHECK: %bb.1 <- %bb.016; CHECK:     -> %bb.217 18; CHECK: Resource length 10, minimal critical path 3019; CHECK: If-converting20 21define i32 @_Z3fooiidd(i32 %a, i32 %b, double %d, double %e) #0 {22; CHECK-LABEL: _Z3fooiidd:23; CHECK:       # %bb.0: # %entry24; CHECK-NEXT:    # kill: def $esi killed $esi def $rsi25; CHECK-NEXT:    # kill: def $edi killed $edi def $rdi26; CHECK-NEXT:    leal (%rsi,%rdi), %ecx27; CHECK-NEXT:    cvttsd2si %xmm0, %eax28; CHECK-NEXT:    addl %ecx, %eax29; CHECK-NEXT:    cmpl $3, %edi30; CHECK-NEXT:    cmovll %ecx, %eax31; CHECK-NEXT:    cvttsd2si %xmm1, %ecx32; CHECK-NEXT:    cltd33; CHECK-NEXT:    idivl %ecx34; CHECK-NEXT:    retq35entry:36  %add = add nsw i32 %b, %a37  %cmp = icmp sgt i32 %a, 238  br i1 %cmp, label %if.then, label %if.end39 40if.then:41  %conv = fptosi double %d to i3242  %add1 = add nsw i32 %add, %conv43  br label %if.end44 45if.end:46  %tmp.0 = phi i32 [ %add1, %if.then ], [ %add, %entry ]47  %conv2 = fptosi double %e to i3248  %div = sdiv i32 %tmp.0, %conv249  ret i32 %div50}51 52attributes #0 = { "tune-cpu"="generic" }53 54