brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.6 KiB · 3d38952 Raw
148 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s3 4; This test hung in the BranchFolding pass during asm-goto bring up5 6@e = dso_local global i32 07@j = dso_local global i32 08 9define dso_local void @n(ptr %o, i32 %p, i32 %u) nounwind {10; CHECK-LABEL: n:11; CHECK:       # %bb.0: # %entry12; CHECK-NEXT:    pushq %rbp13; CHECK-NEXT:    pushq %r1514; CHECK-NEXT:    pushq %r1415; CHECK-NEXT:    pushq %r1316; CHECK-NEXT:    pushq %r1217; CHECK-NEXT:    pushq %rbx18; CHECK-NEXT:    pushq %rax19; CHECK-NEXT:    movl %edx, %ebp20; CHECK-NEXT:    movl %esi, %r12d21; CHECK-NEXT:    movq %rdi, %rbx22; CHECK-NEXT:    callq c23; CHECK-NEXT:    movl %eax, %r14d24; CHECK-NEXT:    movq %rbx, %rdi25; CHECK-NEXT:    callq l26; CHECK-NEXT:    testl %eax, %eax27; CHECK-NEXT:    jne .LBB0_928; CHECK-NEXT:  # %bb.1: # %if.end29; CHECK-NEXT:    cmpl $0, e(%rip)30; CHECK-NEXT:    # implicit-def: $r15d31; CHECK-NEXT:    # implicit-def: $r13d32; CHECK-NEXT:    je .LBB0_433; CHECK-NEXT:  # %bb.2: # %if.then434; CHECK-NEXT:    movslq %r12d, %rdi35; CHECK-NEXT:    callq m36; CHECK-NEXT:    # implicit-def: $r15d37; CHECK-NEXT:    # implicit-def: $r12d38; CHECK-NEXT:  .LBB0_3: # %r39; CHECK-NEXT:    callq c40; CHECK-NEXT:    movl %r12d, %r13d41; CHECK-NEXT:  .LBB0_4: # %if.end842; CHECK-NEXT:    movl %r15d, %edi43; CHECK-NEXT:    callq i44; CHECK-NEXT:    movl %eax, %r12d45; CHECK-NEXT:    orl %r13d, %r12d46; CHECK-NEXT:    andl $4, %r15d47; CHECK-NEXT:    testl %r14d, %r14d48; CHECK-NEXT:    jne .LBB0_349; CHECK-NEXT:  # %bb.5: # %if.end1250; CHECK-NEXT:    testl %r12d, %r12d51; CHECK-NEXT:    je .LBB0_852; CHECK-NEXT:  # %bb.6: # %if.then1453; CHECK-NEXT:    #APP54; CHECK-NEXT:    #NO_APP55; CHECK-NEXT:    jmp .LBB0_956; CHECK-NEXT:  .LBB0_7: # Inline asm indirect target57; CHECK-NEXT:    # %if.then20.critedge58; CHECK-NEXT:    # Label of block must be emitted59; CHECK-NEXT:    movl j(%rip), %edi60; CHECK-NEXT:    movslq %ebp, %rcx61; CHECK-NEXT:    movl $1, %esi62; CHECK-NEXT:    movq %rbx, %rdx63; CHECK-NEXT:    addq $8, %rsp64; CHECK-NEXT:    popq %rbx65; CHECK-NEXT:    popq %r1266; CHECK-NEXT:    popq %r1367; CHECK-NEXT:    popq %r1468; CHECK-NEXT:    popq %r1569; CHECK-NEXT:    popq %rbp70; CHECK-NEXT:    jmp k # TAILCALL71; CHECK-NEXT:  .LBB0_8: # %if.else72; CHECK-NEXT:    incq 073; CHECK-NEXT:  .LBB0_9: # %cleanup74; CHECK-NEXT:    addq $8, %rsp75; CHECK-NEXT:    popq %rbx76; CHECK-NEXT:    popq %r1277; CHECK-NEXT:    popq %r1378; CHECK-NEXT:    popq %r1479; CHECK-NEXT:    popq %r1580; CHECK-NEXT:    popq %rbp81; CHECK-NEXT:    retq82entry:83  %call = tail call i32 @c()84  %call1 = tail call i32 @l(ptr %o)85  %tobool = icmp eq i32 %call1, 086  br i1 %tobool, label %if.end, label %cleanup87 88if.end:                                           ; preds = %entry89  %0 = load i32, ptr @e90  %tobool3 = icmp eq i32 %0, 091  br i1 %tobool3, label %if.end8, label %if.then4, !prof !092 93if.then4:                                         ; preds = %if.end94  %conv5 = sext i32 %p to i6495  %call6 = tail call i32 @m(i64 %conv5)96  br label %r97 98r:                                                ; preds = %if.end8, %if.then499  %flags.0 = phi i32 [ undef, %if.then4 ], [ %and, %if.end8 ]100  %major.0 = phi i32 [ undef, %if.then4 ], [ %or, %if.end8 ]101  %call7 = tail call i32 @c()102  br label %if.end8103 104if.end8:                                          ; preds = %r, %if.end105  %flags.1 = phi i32 [ %flags.0, %r ], [ undef, %if.end ]106  %major.1 = phi i32 [ %major.0, %r ], [ undef, %if.end ]107  %call9 = tail call i32 @i(i32 %flags.1)108  %or = or i32 %call9, %major.1109  %and = and i32 %flags.1, 4110  %tobool10 = icmp eq i32 %call, 0111  br i1 %tobool10, label %if.end12, label %r112 113if.end12:                                         ; preds = %if.end8114  %tobool13 = icmp eq i32 %or, 0115  br i1 %tobool13, label %if.else, label %if.then14116 117if.then14:                                        ; preds = %if.end12118  callbr void asm sideeffect "", "!i,~{dirflag},~{fpsr},~{flags}"()119          to label %cleanup [label %if.then20.critedge]120 121if.then20.critedge:                               ; preds = %if.then14122  %1 = load i32, ptr @j123  %conv21 = sext i32 %u to i64124  %call22 = tail call i32 @k(i32 %1, i64 1, ptr %o, i64 %conv21)125  br label %cleanup126 127if.else:                                          ; preds = %if.end12128  %2 = load i64, ptr null129  %inc = add i64 %2, 1130  store i64 %inc, ptr null131  br label %cleanup132 133cleanup:                                          ; preds = %if.else, %if.then20.critedge, %if.then14, %entry134  ret void135}136 137declare dso_local i32 @c()138 139declare dso_local i32 @l(ptr)140 141declare dso_local i32 @m(i64)142 143declare dso_local i32 @i(i32)144 145declare dso_local i32 @k(i32, i64, ptr, i64)146 147!0 = !{!"branch_weights", i32 2000, i32 1}148