brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 5cb1b8f Raw
85 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc %s -o - -enable-shrink-wrap=true | FileCheck --check-prefix=SHRINK-WRAP %s3; RUN: llc %s -o - -enable-shrink-wrap=false | FileCheck --check-prefix=NO-SHRINK-WRAP %s4target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"5target triple = "i686-pc-windows-msvc18.0.0"6 7%struct.S = type { i32 }8 9; Check that we do not use a basic block that has EFLAGS as live-in10; if we need to realign the stack.11define x86_thiscallcc void @stackRealignment(ptr %this) {12; SHRINK-WRAP-LABEL: stackRealignment:13; SHRINK-WRAP:       # %bb.0: # %entry14; SHRINK-WRAP-NEXT:    movl (%ecx), %eax15; SHRINK-WRAP-NEXT:    cmpl $33, %eax16; SHRINK-WRAP-NEXT:    movl $42, %edx17; SHRINK-WRAP-NEXT:    jge LBB0_218; SHRINK-WRAP-NEXT:  # %bb.1: # %entry19; SHRINK-WRAP-NEXT:    movl $128, %edx20; SHRINK-WRAP-NEXT:  LBB0_2: # %entry21; SHRINK-WRAP-NEXT:    pushl %ebp22; SHRINK-WRAP-NEXT:    movl %esp, %ebp23; SHRINK-WRAP-NEXT:    andl $-8, %esp24; SHRINK-WRAP-NEXT:    subl $16, %esp25; SHRINK-WRAP-NEXT:    movl %edx, {{[0-9]+}}(%esp)26; SHRINK-WRAP-NEXT:    cmpl $32, %eax27; SHRINK-WRAP-NEXT:    jl LBB0_428; SHRINK-WRAP-NEXT:  # %bb.3: # %if.end29; SHRINK-WRAP-NEXT:    leal {{[0-9]+}}(%esp), %eax30; SHRINK-WRAP-NEXT:    leal {{[0-9]+}}(%esp), %edx31; SHRINK-WRAP-NEXT:    pushl %eax32; SHRINK-WRAP-NEXT:    pushl %edx33; SHRINK-WRAP-NEXT:    calll _bar34; SHRINK-WRAP-NEXT:  LBB0_4: # %cleanup35; SHRINK-WRAP-NEXT:    movl %ebp, %esp36; SHRINK-WRAP-NEXT:    popl %ebp37; SHRINK-WRAP-NEXT:    retl38;39; NO-SHRINK-WRAP-LABEL: stackRealignment:40; NO-SHRINK-WRAP:       # %bb.0: # %entry41; NO-SHRINK-WRAP-NEXT:    pushl %ebp42; NO-SHRINK-WRAP-NEXT:    movl %esp, %ebp43; NO-SHRINK-WRAP-NEXT:    andl $-8, %esp44; NO-SHRINK-WRAP-NEXT:    subl $16, %esp45; NO-SHRINK-WRAP-NEXT:    movl (%ecx), %eax46; NO-SHRINK-WRAP-NEXT:    cmpl $33, %eax47; NO-SHRINK-WRAP-NEXT:    movl $42, %edx48; NO-SHRINK-WRAP-NEXT:    jge LBB0_249; NO-SHRINK-WRAP-NEXT:  # %bb.1: # %entry50; NO-SHRINK-WRAP-NEXT:    movl $128, %edx51; NO-SHRINK-WRAP-NEXT:  LBB0_2: # %entry52; NO-SHRINK-WRAP-NEXT:    movl %edx, {{[0-9]+}}(%esp)53; NO-SHRINK-WRAP-NEXT:    cmpl $32, %eax54; NO-SHRINK-WRAP-NEXT:    jl LBB0_455; NO-SHRINK-WRAP-NEXT:  # %bb.3: # %if.end56; NO-SHRINK-WRAP-NEXT:    leal {{[0-9]+}}(%esp), %eax57; NO-SHRINK-WRAP-NEXT:    leal {{[0-9]+}}(%esp), %edx58; NO-SHRINK-WRAP-NEXT:    pushl %eax59; NO-SHRINK-WRAP-NEXT:    pushl %edx60; NO-SHRINK-WRAP-NEXT:    calll _bar61; NO-SHRINK-WRAP-NEXT:  LBB0_4: # %cleanup62; NO-SHRINK-WRAP-NEXT:    movl %ebp, %esp63; NO-SHRINK-WRAP-NEXT:    popl %ebp64; NO-SHRINK-WRAP-NEXT:    retl65entry:66  %data = alloca [1 x i32], align 467  %d = alloca double, align 868  %tmp1 = load i32, ptr %this, align 469  %cmp = icmp sgt i32 %tmp1, 3270  %cond = select i1 %cmp, i32 42, i32 12871  store i32 %cond, ptr %data, align 472  %cmp3 = icmp slt i32 %tmp1, 3273  br i1 %cmp3, label %cleanup, label %if.end74 75if.end:                                           ; preds = %entry76  call x86_thiscallcc void @bar(ptr nonnull %this, ptr %data, ptr nonnull %d)77  br label %cleanup78 79cleanup:                                          ; preds = %if.end, %entry80  ret void81}82 83; Function Attrs: optsize84declare x86_thiscallcc void @bar(ptr, ptr, ptr)85