|
| 1 | +# RUN: llc -mtriple=aarch64 -run-pass=prologepilog %s -o - | FileCheck %s |
| 2 | +--- | |
| 3 | + ; ModuleID = 'bug.c' |
| 4 | + source_filename = "bug.c" |
| 5 | + target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" |
| 6 | + target triple = "aarch64-unknown-linux-gnu" |
| 7 | + |
| 8 | + ; Function Attrs: mustprogress noinline optnone uwtable |
| 9 | + define dso_local noundef i32 @_Z4funcv() #0 { |
| 10 | + entry: |
| 11 | + %array = alloca [1073741824 x i32], align 4 |
| 12 | + %arrayidx = getelementptr inbounds [1073741824 x i32], ptr %array, i64 0, i64 20 |
| 13 | + store i32 7, ptr %arrayidx, align 4 |
| 14 | + call void @_Z5func2v() |
| 15 | + %arrayidx1 = getelementptr inbounds [1073741824 x i32], ptr %array, i64 0, i64 20 |
| 16 | + %0 = load i32, ptr %arrayidx1, align 4 |
| 17 | + ret i32 %0 |
| 18 | + } |
| 19 | + |
| 20 | + declare void @_Z5func2v() #1 |
| 21 | + |
| 22 | + attributes #0 = { mustprogress noinline optnone uwtable "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+fp-armv8,+neon,+outline-atomics,+v8a,-fmv" } |
| 23 | + attributes #1 = { "frame-pointer"="non-leaf" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+fp-armv8,+neon,+outline-atomics,+v8a,-fmv" } |
| 24 | +... |
| 25 | +--- |
| 26 | +name: _Z4funcv |
| 27 | +alignment: 4 |
| 28 | +legalized: true |
| 29 | +regBankSelected: true |
| 30 | +selected: true |
| 31 | +tracksRegLiveness: true |
| 32 | +noPhis: true |
| 33 | +isSSA: false |
| 34 | +noVRegs: true |
| 35 | +hasFakeUses: false |
| 36 | +frameInfo: |
| 37 | + maxAlignment: 4 |
| 38 | + adjustsStack: true |
| 39 | + hasCalls: true |
| 40 | + maxCallFrameSize: 0 |
| 41 | +stack: |
| 42 | + - { id: 0, name: array, size: 4294967296, alignment: 4, local-offset: -4294967296 } |
| 43 | +machineFunctionInfo: {} |
| 44 | +body: | |
| 45 | + bb.1.entry: |
| 46 | + renamable $w8 = MOVi32imm 7 |
| 47 | + STRWui killed renamable $w8, %stack.0.array, 20 :: (store (s32) into %ir.arrayidx) |
| 48 | + ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp |
| 49 | + BL @_Z5func2v, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp |
| 50 | + ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp |
| 51 | + renamable $w0 = LDRWui %stack.0.array, 20 :: (dereferenceable load (s32) from %ir.arrayidx1) |
| 52 | + ; CHECK: early-clobber $sp, $fp, $lr = frame-destroy LDPXpost $sp |
| 53 | + RET_ReallyLR implicit killed $w0 |
| 54 | +
|
| 55 | +... |
0 commit comments