brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · fc1915e Raw
89 lines · plain
1# RUN: not llc -mtriple=x86_64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s2 3--- |4 5  define i32 @compute(i32 %a) {6  body:7    ret i32 %a8  }9 10  define i32 @func(i32 %a) {11  entry:12    %b = alloca i3213    store i32 %a, ptr %b14    br label %check15 16  check:17    %comp = icmp sle i32 %a, 1018    br i1 %comp, label %loop, label %exit19 20  loop:21    %c = load i32, ptr %b22    %d = call i32 @compute(i32 %c)23    %e = sub i32 %d, 124    store i32 %e, ptr %b25    br label %check26 27  exit:28    ret i32 029  }30 31...32---33name:            compute34tracksRegLiveness: true35body: |36  bb.0.body:37    liveins: $edi38 39    $eax = COPY killed $edi40    RET64 killed $eax41...42---43name:            func44tracksRegLiveness: true45frameInfo:46  stackSize:       2447  maxAlignment:    448  adjustsStack:    true49  hasCalls:        true50fixedStack:51  # CHECK: [[@LINE+1]]:93: expected a named register52  - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16, callee-saved-register: '%0' }53stack:54  - { id: 0, name: b, offset: -20, size: 4, alignment: 4 }55body: |56  bb.0.entry:57    successors: %bb.1.check58    liveins: $edi, $rbx59 60    frame-setup PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp61    $rsp = frame-setup SUB64ri8 $rsp, 16, implicit-def dead $eflags62    $ebx = COPY $edi63    MOV32mr $rsp, 1, _, 12, _, $ebx64 65  bb.1.check:66    successors: %bb.2.loop, %bb.3.exit67    liveins: $ebx68 69    CMP32ri8 $ebx, 10, implicit-def $eflags70    JCC_1 %bb.3.exit, 15, implicit killed $eflags71    JMP_1 %bb.2.loop72 73  bb.2.loop:74    successors: %bb.1.check75    liveins: $ebx76 77    $edi = MOV32rm $rsp, 1, _, 12, _78    CALL64pcrel32 @compute, csr_64, implicit $rsp, implicit $edi, implicit-def $rsp, implicit-def $eax79    $eax = DEC32r killed $eax, implicit-def dead $eflags80    MOV32mr $rsp, 1, _, 12, _, killed $eax81    JMP_1 %bb.1.check82 83  bb.3.exit:84    $eax = MOV32r0 implicit-def dead $eflags85    $rsp = ADD64ri8 $rsp, 16, implicit-def dead $eflags86    $rbx = POP64r implicit-def $rsp, implicit $rsp87    RET64 $eax88...89