89 lines · plain
1# RUN: llc -o - %s -mtriple=aarch64-windows -start-before=prologepilog \2# RUN: -stop-after=prologepilog | FileCheck %s3# Test that the frame lowering emits correct SEH updates for the case without4# a stack frame (e.g. no callee saved registers, no frame pointer, just locals)5 6# CHECK: $sp = frame-setup SUBXri $sp, 16, 07# CHECK-NEXT: frame-setup SEH_StackAlloc 168# CHECK-NEXT: frame-setup SEH_PrologEnd9# CHECK: frame-destroy SEH_EpilogStart10# CHECK-NEXT: $sp = frame-destroy ADDXri $sp, 16, 011# CHECK-NEXT: frame-destroy SEH_StackAlloc 1612# CHECK-NEXT: frame-destroy SEH_EpilogEnd13# CHECK-NEXT: RET_ReallyLR implicit killed $w014 15--- |16 target datalayout = "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128"17 target triple = "aarch64-unknown-windows-msvc19.11.0"18 19 ; Function Attrs: noinline nounwind optnone uwtable20 define dso_local i32 @"?func@@YAHH@Z"(i32 %a) #0 {21 entry:22 %a.addr = alloca i32, align 423 %b = alloca i32, align 424 store i32 %a, ptr %a.addr, align 425 store i32 2, ptr %b, align 426 %0 = load i32, ptr %b, align 427 %1 = load i32, ptr %a.addr, align 428 %add = add nsw i32 %0, %129 ret i32 %add30 }31 32 attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon" "use-soft-float"="false" }33 34...35---36name: '?func@@YAHH@Z'37alignment: 438exposesReturnsTwice: false39legalized: true40regBankSelected: true41selected: true42failedISel: false43tracksRegLiveness: true44registers:45liveins:46frameInfo:47 isFrameAddressTaken: false48 isReturnAddressTaken: false49 hasStackMap: false50 hasPatchPoint: false51 stackSize: 052 offsetAdjustment: 053 maxAlignment: 454 adjustsStack: false55 hasCalls: false56 stackProtector: ''57 maxCallFrameSize: 058 cvBytesOfCalleeSavedRegisters: 059 hasOpaqueSPAdjustment: false60 hasVAStart: false61 hasMustTailInVarArgFunc: false62 localFrameSize: 863 savePoint: []64 restorePoint: []65fixedStack:66stack:67 - { id: 0, name: a.addr, type: default, offset: 0, size: 4, alignment: 4,68 stack-id: default, callee-saved-register: '', callee-saved-restored: true,69 local-offset: -4, debug-info-variable: '', debug-info-expression: '',70 debug-info-location: '' }71 - { id: 1, name: b, type: default, offset: 0, size: 4, alignment: 4,72 stack-id: default, callee-saved-register: '', callee-saved-restored: true,73 local-offset: -8, debug-info-variable: '', debug-info-expression: '',74 debug-info-location: '' }75constants:76body: |77 bb.1.entry:78 liveins: $w079 80 renamable $w8 = MOVi32imm 281 STRWui killed renamable $w0, %stack.0.a.addr, 0 :: (store (s32) into %ir.a.addr)82 STRWui killed renamable $w8, %stack.1.b, 0 :: (store (s32) into %ir.b)83 renamable $w8 = LDRWui %stack.1.b, 0 :: (load (s32) from %ir.b)84 renamable $w0 = LDRWui %stack.0.a.addr, 0 :: (load (s32) from %ir.a.addr)85 renamable $w0 = nsw ADDWrr killed renamable $w8, killed renamable $w086 RET_ReallyLR implicit killed $w087 88...89