brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.2 KiB · 482c814 Raw
180 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-pc-linux-gnu | FileCheck %s -check-prefix=DEFAULT3; RUN: llc < %s -mtriple=i686-pc-linux-gnu -x86-experimental-pref-innermost-loop-alignment=5 | FileCheck %s -check-prefix=ALIGN324; RUN: llc < %s -mtriple=i686-pc-linux-gnu -align-loops=32 -x86-experimental-pref-innermost-loop-alignment=6 | FileCheck %s -check-prefix=ALIGN645 6declare void @foo()7 8define void @test(i32 %n, i32 %m) {9; DEFAULT-LABEL: test:10; DEFAULT:       # %bb.0: # %entry11; DEFAULT-NEXT:    pushl %ebp12; DEFAULT-NEXT:    .cfi_def_cfa_offset 813; DEFAULT-NEXT:    pushl %ebx14; DEFAULT-NEXT:    .cfi_def_cfa_offset 1215; DEFAULT-NEXT:    pushl %edi16; DEFAULT-NEXT:    .cfi_def_cfa_offset 1617; DEFAULT-NEXT:    pushl %esi18; DEFAULT-NEXT:    .cfi_def_cfa_offset 2019; DEFAULT-NEXT:    subl $12, %esp20; DEFAULT-NEXT:    .cfi_def_cfa_offset 3221; DEFAULT-NEXT:    .cfi_offset %esi, -2022; DEFAULT-NEXT:    .cfi_offset %edi, -1623; DEFAULT-NEXT:    .cfi_offset %ebx, -1224; DEFAULT-NEXT:    .cfi_offset %ebp, -825; DEFAULT-NEXT:    xorl %esi, %esi26; DEFAULT-NEXT:    movl {{[0-9]+}}(%esp), %edi27; DEFAULT-NEXT:    movl {{[0-9]+}}(%esp), %ebx28; DEFAULT-NEXT:    .p2align 429; DEFAULT-NEXT:  .LBB0_1: # %outer30; DEFAULT-NEXT:    # =>This Loop Header: Depth=131; DEFAULT-NEXT:    # Child Loop BB0_2 Depth 232; DEFAULT-NEXT:    movl %edi, %ebp33; DEFAULT-NEXT:    .p2align 434; DEFAULT-NEXT:  .LBB0_2: # %inner35; DEFAULT-NEXT:    # Parent Loop BB0_1 Depth=136; DEFAULT-NEXT:    # => This Inner Loop Header: Depth=237; DEFAULT-NEXT:    calll foo@PLT38; DEFAULT-NEXT:    decl %ebp39; DEFAULT-NEXT:    jne .LBB0_240; DEFAULT-NEXT:  # %bb.3: # %outer_bb41; DEFAULT-NEXT:    # in Loop: Header=BB0_1 Depth=142; DEFAULT-NEXT:    incl %esi43; DEFAULT-NEXT:    cmpl %ebx, %esi44; DEFAULT-NEXT:    jne .LBB0_145; DEFAULT-NEXT:  # %bb.4: # %exit46; DEFAULT-NEXT:    addl $12, %esp47; DEFAULT-NEXT:    .cfi_def_cfa_offset 2048; DEFAULT-NEXT:    popl %esi49; DEFAULT-NEXT:    .cfi_def_cfa_offset 1650; DEFAULT-NEXT:    popl %edi51; DEFAULT-NEXT:    .cfi_def_cfa_offset 1252; DEFAULT-NEXT:    popl %ebx53; DEFAULT-NEXT:    .cfi_def_cfa_offset 854; DEFAULT-NEXT:    popl %ebp55; DEFAULT-NEXT:    .cfi_def_cfa_offset 456; DEFAULT-NEXT:    retl57;58; ALIGN32-LABEL: test:59; ALIGN32:       # %bb.0: # %entry60; ALIGN32-NEXT:    pushl %ebp61; ALIGN32-NEXT:    .cfi_def_cfa_offset 862; ALIGN32-NEXT:    pushl %ebx63; ALIGN32-NEXT:    .cfi_def_cfa_offset 1264; ALIGN32-NEXT:    pushl %edi65; ALIGN32-NEXT:    .cfi_def_cfa_offset 1666; ALIGN32-NEXT:    pushl %esi67; ALIGN32-NEXT:    .cfi_def_cfa_offset 2068; ALIGN32-NEXT:    subl $12, %esp69; ALIGN32-NEXT:    .cfi_def_cfa_offset 3270; ALIGN32-NEXT:    .cfi_offset %esi, -2071; ALIGN32-NEXT:    .cfi_offset %edi, -1672; ALIGN32-NEXT:    .cfi_offset %ebx, -1273; ALIGN32-NEXT:    .cfi_offset %ebp, -874; ALIGN32-NEXT:    xorl %esi, %esi75; ALIGN32-NEXT:    movl {{[0-9]+}}(%esp), %edi76; ALIGN32-NEXT:    movl {{[0-9]+}}(%esp), %ebx77; ALIGN32-NEXT:    .p2align 478; ALIGN32-NEXT:  .LBB0_1: # %outer79; ALIGN32-NEXT:    # =>This Loop Header: Depth=180; ALIGN32-NEXT:    # Child Loop BB0_2 Depth 281; ALIGN32-NEXT:    movl %edi, %ebp82; ALIGN32-NEXT:    .p2align 583; ALIGN32-NEXT:  .LBB0_2: # %inner84; ALIGN32-NEXT:    # Parent Loop BB0_1 Depth=185; ALIGN32-NEXT:    # => This Inner Loop Header: Depth=286; ALIGN32-NEXT:    calll foo@PLT87; ALIGN32-NEXT:    decl %ebp88; ALIGN32-NEXT:    jne .LBB0_289; ALIGN32-NEXT:  # %bb.3: # %outer_bb90; ALIGN32-NEXT:    # in Loop: Header=BB0_1 Depth=191; ALIGN32-NEXT:    incl %esi92; ALIGN32-NEXT:    cmpl %ebx, %esi93; ALIGN32-NEXT:    jne .LBB0_194; ALIGN32-NEXT:  # %bb.4: # %exit95; ALIGN32-NEXT:    addl $12, %esp96; ALIGN32-NEXT:    .cfi_def_cfa_offset 2097; ALIGN32-NEXT:    popl %esi98; ALIGN32-NEXT:    .cfi_def_cfa_offset 1699; ALIGN32-NEXT:    popl %edi100; ALIGN32-NEXT:    .cfi_def_cfa_offset 12101; ALIGN32-NEXT:    popl %ebx102; ALIGN32-NEXT:    .cfi_def_cfa_offset 8103; ALIGN32-NEXT:    popl %ebp104; ALIGN32-NEXT:    .cfi_def_cfa_offset 4105; ALIGN32-NEXT:    retl106;107; ALIGN64-LABEL: test:108; ALIGN64:       # %bb.0: # %entry109; ALIGN64-NEXT:    pushl %ebp110; ALIGN64-NEXT:    .cfi_def_cfa_offset 8111; ALIGN64-NEXT:    pushl %ebx112; ALIGN64-NEXT:    .cfi_def_cfa_offset 12113; ALIGN64-NEXT:    pushl %edi114; ALIGN64-NEXT:    .cfi_def_cfa_offset 16115; ALIGN64-NEXT:    pushl %esi116; ALIGN64-NEXT:    .cfi_def_cfa_offset 20117; ALIGN64-NEXT:    subl $12, %esp118; ALIGN64-NEXT:    .cfi_def_cfa_offset 32119; ALIGN64-NEXT:    .cfi_offset %esi, -20120; ALIGN64-NEXT:    .cfi_offset %edi, -16121; ALIGN64-NEXT:    .cfi_offset %ebx, -12122; ALIGN64-NEXT:    .cfi_offset %ebp, -8123; ALIGN64-NEXT:    xorl %esi, %esi124; ALIGN64-NEXT:    movl {{[0-9]+}}(%esp), %edi125; ALIGN64-NEXT:    movl {{[0-9]+}}(%esp), %ebx126; ALIGN64-NEXT:    .p2align 5127; ALIGN64-NEXT:  .LBB0_1: # %outer128; ALIGN64-NEXT:    # =>This Loop Header: Depth=1129; ALIGN64-NEXT:    # Child Loop BB0_2 Depth 2130; ALIGN64-NEXT:    movl %edi, %ebp131; ALIGN64-NEXT:    .p2align 6132; ALIGN64-NEXT:  .LBB0_2: # %inner133; ALIGN64-NEXT:    # Parent Loop BB0_1 Depth=1134; ALIGN64-NEXT:    # => This Inner Loop Header: Depth=2135; ALIGN64-NEXT:    calll foo@PLT136; ALIGN64-NEXT:    decl %ebp137; ALIGN64-NEXT:    jne .LBB0_2138; ALIGN64-NEXT:  # %bb.3: # %outer_bb139; ALIGN64-NEXT:    # in Loop: Header=BB0_1 Depth=1140; ALIGN64-NEXT:    incl %esi141; ALIGN64-NEXT:    cmpl %ebx, %esi142; ALIGN64-NEXT:    jne .LBB0_1143; ALIGN64-NEXT:  # %bb.4: # %exit144; ALIGN64-NEXT:    addl $12, %esp145; ALIGN64-NEXT:    .cfi_def_cfa_offset 20146; ALIGN64-NEXT:    popl %esi147; ALIGN64-NEXT:    .cfi_def_cfa_offset 16148; ALIGN64-NEXT:    popl %edi149; ALIGN64-NEXT:    .cfi_def_cfa_offset 12150; ALIGN64-NEXT:    popl %ebx151; ALIGN64-NEXT:    .cfi_def_cfa_offset 8152; ALIGN64-NEXT:    popl %ebp153; ALIGN64-NEXT:    .cfi_def_cfa_offset 4154; ALIGN64-NEXT:    retl155 156 157 158entry:159  br label %outer160 161outer:162  %outer.iv = phi i32 [0, %entry], [%outer.iv.next, %outer_bb]163  br label %inner164 165inner:166  %inner.iv = phi i32 [0, %outer], [%inner.iv.next, %inner]167  call void @foo()168  %inner.iv.next = add i32 %inner.iv, 1169  %inner.cond = icmp ne i32 %inner.iv.next, %m170  br i1 %inner.cond, label %inner, label %outer_bb171 172outer_bb:173  %outer.iv.next = add i32 %outer.iv, 1174  %outer.cond = icmp ne i32 %outer.iv.next, %n175  br i1 %outer.cond, label %outer, label %exit176 177exit:178  ret void179}180