brintos

brintos / llvm-project-archived public Read only

0
0
Text · 10.0 KiB · c0170e7 Raw
286 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2# RUN: llc -mtriple riscv32 -mattr=+zve64x -start-before=prologepilog -o - \3# RUN:     -verify-machineinstrs %s | FileCheck %s --check-prefix=RV324# RUN: llc -mtriple riscv32 -mattr=+v -start-before=prologepilog -o - \5# RUN:     -verify-machineinstrs %s | FileCheck %s --check-prefix=RV326# RUN: llc -mtriple riscv64 -mattr=+zve64x -start-before=prologepilog -o - \7# RUN:     -verify-machineinstrs %s | FileCheck %s --check-prefix=RV648# RUN: llc -mtriple riscv64 -mattr=+v -start-before=prologepilog -o - \9# RUN:     -verify-machineinstrs %s | FileCheck %s --check-prefix=RV6410--- |11  target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"12  target triple = "riscv64"13 14  declare void @extern(ptr)15 16  define void @rvv_stack_align8() #0 {17  ; RV32-LABEL: rvv_stack_align8:18  ; RV32:       # %bb.0:19  ; RV32-NEXT:    addi sp, sp, -4820  ; RV32-NEXT:    sw ra, 44(sp) # 4-byte Folded Spill21  ; RV32-NEXT:    csrr a0, vlenb22  ; RV32-NEXT:    slli a0, a0, 123  ; RV32-NEXT:    sub sp, sp, a024  ; RV32-NEXT:    addi a0, sp, 3225  ; RV32-NEXT:    addi a1, sp, 1626  ; RV32-NEXT:    addi a2, sp, 827  ; RV32-NEXT:    call extern28  ; RV32-NEXT:    csrr a0, vlenb29  ; RV32-NEXT:    slli a0, a0, 130  ; RV32-NEXT:    add sp, sp, a031  ; RV32-NEXT:    lw ra, 44(sp) # 4-byte Folded Reload32  ; RV32-NEXT:    addi sp, sp, 4833  ; RV32-NEXT:    ret34  ;35  ; RV64-LABEL: rvv_stack_align8:36  ; RV64:       # %bb.0:37  ; RV64-NEXT:    addi sp, sp, -4838  ; RV64-NEXT:    sd ra, 40(sp) # 8-byte Folded Spill39  ; RV64-NEXT:    csrr a0, vlenb40  ; RV64-NEXT:    slli a0, a0, 141  ; RV64-NEXT:    sub sp, sp, a042  ; RV64-NEXT:    addi a0, sp, 3243  ; RV64-NEXT:    addi a1, sp, 1644  ; RV64-NEXT:    addi a2, sp, 845  ; RV64-NEXT:    call extern46  ; RV64-NEXT:    csrr a0, vlenb47  ; RV64-NEXT:    slli a0, a0, 148  ; RV64-NEXT:    add sp, sp, a049  ; RV64-NEXT:    ld ra, 40(sp) # 8-byte Folded Reload50  ; RV64-NEXT:    addi sp, sp, 4851  ; RV64-NEXT:    ret52    %a = alloca <vscale x 4 x i32>, align 853    %b = alloca i6454    %c = alloca i6455    call void @extern(ptr %a)56    ret void57  }58 59  define void @rvv_stack_align16() #0 {60  ; RV32-LABEL: rvv_stack_align16:61  ; RV32:       # %bb.0:62  ; RV32-NEXT:    addi sp, sp, -4863  ; RV32-NEXT:    sw ra, 44(sp) # 4-byte Folded Spill64  ; RV32-NEXT:    csrr a0, vlenb65  ; RV32-NEXT:    slli a0, a0, 166  ; RV32-NEXT:    sub sp, sp, a067  ; RV32-NEXT:    addi a0, sp, 3268  ; RV32-NEXT:    addi a1, sp, 1669  ; RV32-NEXT:    addi a2, sp, 870  ; RV32-NEXT:    call extern71  ; RV32-NEXT:    csrr a0, vlenb72  ; RV32-NEXT:    slli a0, a0, 173  ; RV32-NEXT:    add sp, sp, a074  ; RV32-NEXT:    lw ra, 44(sp) # 4-byte Folded Reload75  ; RV32-NEXT:    addi sp, sp, 4876  ; RV32-NEXT:    ret77  ;78  ; RV64-LABEL: rvv_stack_align16:79  ; RV64:       # %bb.0:80  ; RV64-NEXT:    addi sp, sp, -4881  ; RV64-NEXT:    sd ra, 40(sp) # 8-byte Folded Spill82  ; RV64-NEXT:    csrr a0, vlenb83  ; RV64-NEXT:    slli a0, a0, 184  ; RV64-NEXT:    sub sp, sp, a085  ; RV64-NEXT:    addi a0, sp, 3286  ; RV64-NEXT:    addi a1, sp, 1687  ; RV64-NEXT:    addi a2, sp, 888  ; RV64-NEXT:    call extern89  ; RV64-NEXT:    csrr a0, vlenb90  ; RV64-NEXT:    slli a0, a0, 191  ; RV64-NEXT:    add sp, sp, a092  ; RV64-NEXT:    ld ra, 40(sp) # 8-byte Folded Reload93  ; RV64-NEXT:    addi sp, sp, 4894  ; RV64-NEXT:    ret95    %a = alloca <vscale x 4 x i32>, align 1696    %b = alloca i6497    %c = alloca i6498    call void @extern(ptr %a)99    ret void100  }101 102  define void @rvv_stack_align32() #0 {103  ; RV32-LABEL: rvv_stack_align32:104  ; RV32:       # %bb.0:105  ; RV32-NEXT:    addi sp, sp, -48106  ; RV32-NEXT:    sw ra, 44(sp) # 4-byte Folded Spill107  ; RV32-NEXT:    sw s0, 40(sp) # 4-byte Folded Spill108  ; RV32-NEXT:    addi s0, sp, 48109  ; RV32-NEXT:    csrr a0, vlenb110  ; RV32-NEXT:    slli a0, a0, 2111  ; RV32-NEXT:    sub sp, sp, a0112  ; RV32-NEXT:    andi sp, sp, -32113  ; RV32-NEXT:    addi a0, sp, 32114  ; RV32-NEXT:    addi a1, sp, 16115  ; RV32-NEXT:    addi a2, sp, 8116  ; RV32-NEXT:    call extern117  ; RV32-NEXT:    addi sp, s0, -48118  ; RV32-NEXT:    lw ra, 44(sp) # 4-byte Folded Reload119  ; RV32-NEXT:    lw s0, 40(sp) # 4-byte Folded Reload120  ; RV32-NEXT:    addi sp, sp, 48121  ; RV32-NEXT:    ret122  ;123  ; RV64-LABEL: rvv_stack_align32:124  ; RV64:       # %bb.0:125  ; RV64-NEXT:    addi sp, sp, -80126  ; RV64-NEXT:    sd ra, 72(sp) # 8-byte Folded Spill127  ; RV64-NEXT:    sd s0, 64(sp) # 8-byte Folded Spill128  ; RV64-NEXT:    addi s0, sp, 80129  ; RV64-NEXT:    csrr a0, vlenb130  ; RV64-NEXT:    slli a0, a0, 2131  ; RV64-NEXT:    sub sp, sp, a0132  ; RV64-NEXT:    andi sp, sp, -32133  ; RV64-NEXT:    addi a0, sp, 64134  ; RV64-NEXT:    addi a1, sp, 40135  ; RV64-NEXT:    addi a2, sp, 32136  ; RV64-NEXT:    call extern137  ; RV64-NEXT:    addi sp, s0, -80138  ; RV64-NEXT:    ld ra, 72(sp) # 8-byte Folded Reload139  ; RV64-NEXT:    ld s0, 64(sp) # 8-byte Folded Reload140  ; RV64-NEXT:    addi sp, sp, 80141  ; RV64-NEXT:    ret142    %a = alloca <vscale x 4 x i32>, align 32143    %b = alloca i64144    %c = alloca i64145    call void @extern(ptr %a)146    ret void147  }148 149  attributes #0 = { nounwind nofree nosync }150...151---152name:            rvv_stack_align8153alignment:       4154frameInfo:155  isFrameAddressTaken: false156  isReturnAddressTaken: false157  hasStackMap:     false158  hasPatchPoint:   false159  stackSize:       0160  offsetAdjustment: 0161  maxAlignment:    8162  adjustsStack:    true163  hasCalls:        true164  stackProtector:  ''165  maxCallFrameSize: 4294967295166  cvBytesOfCalleeSavedRegisters: 0167  hasOpaqueSPAdjustment: false168  hasVAStart:      false169  hasMustTailInVarArgFunc: false170  hasTailCall:     false171  localFrameSize:  0172  savePoint:       []173  restorePoint:    []174fixedStack:      []175stack:176  - { id: 0, name: a, type: default, offset: 0, size: 16, alignment: 8,177      stack-id: scalable-vector, callee-saved-register: '', callee-saved-restored: true,178      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }179  - { id: 1, name: b, type: default, offset: 0, size: 8, alignment: 8,180      stack-id: default, callee-saved-register: '', callee-saved-restored: true,181      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }182  - { id: 2, name: c, type: default, offset: 0, size: 8, alignment: 8,183      stack-id: default, callee-saved-register: '', callee-saved-restored: true,184      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }185body:             |186  bb.0 (%ir-block.0):187    ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2188    $x10 = ADDI %stack.0.a, 0189    $x11 = ADDI %stack.1.b, 0190    $x12 = ADDI %stack.2.c, 0191    PseudoCALL target-flags(riscv-call) @extern, csr_ilp32d_lp64d, implicit-def dead $x1, implicit killed $x10, implicit-def $x2192    ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2193    PseudoRET194 195...196---197name:            rvv_stack_align16198alignment:       4199frameInfo:200  isFrameAddressTaken: false201  isReturnAddressTaken: false202  hasStackMap:     false203  hasPatchPoint:   false204  stackSize:       0205  offsetAdjustment: 0206  maxAlignment:    16207  adjustsStack:    true208  hasCalls:        true209  stackProtector:  ''210  maxCallFrameSize: 4294967295211  cvBytesOfCalleeSavedRegisters: 0212  hasOpaqueSPAdjustment: false213  hasVAStart:      false214  hasMustTailInVarArgFunc: false215  hasTailCall:     false216  localFrameSize:  0217  savePoint:       []218  restorePoint:    []219fixedStack:      []220stack:221  - { id: 0, name: a, type: default, offset: 0, size: 16, alignment: 16,222      stack-id: scalable-vector, callee-saved-register: '', callee-saved-restored: true,223      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }224  - { id: 1, name: b, type: default, offset: 0, size: 8, alignment: 8,225      stack-id: default, callee-saved-register: '', callee-saved-restored: true,226      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }227  - { id: 2, name: c, type: default, offset: 0, size: 8, alignment: 8,228      stack-id: default, callee-saved-register: '', callee-saved-restored: true,229      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }230body:             |231  bb.0 (%ir-block.0):232    ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2233    $x10 = ADDI %stack.0.a, 0234    $x11 = ADDI %stack.1.b, 0235    $x12 = ADDI %stack.2.c, 0236    PseudoCALL target-flags(riscv-call) @extern, csr_ilp32d_lp64d, implicit-def dead $x1, implicit killed $x10, implicit-def $x2237    ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2238    PseudoRET239 240...241---242name:            rvv_stack_align32243alignment:       4244frameInfo:245  isFrameAddressTaken: false246  isReturnAddressTaken: false247  hasStackMap:     false248  hasPatchPoint:   false249  stackSize:       0250  offsetAdjustment: 0251  maxAlignment:    32252  adjustsStack:    true253  hasCalls:        true254  stackProtector:  ''255  maxCallFrameSize: 4294967295256  cvBytesOfCalleeSavedRegisters: 0257  hasOpaqueSPAdjustment: false258  hasVAStart:      false259  hasMustTailInVarArgFunc: false260  hasTailCall:     false261  localFrameSize:  0262  savePoint:       []263  restorePoint:    []264fixedStack:      []265stack:266  - { id: 0, name: a, type: default, offset: 0, size: 16, alignment: 32,267      stack-id: scalable-vector, callee-saved-register: '', callee-saved-restored: true,268      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }269  - { id: 1, name: b, type: default, offset: 0, size: 8, alignment: 8,270      stack-id: default, callee-saved-register: '', callee-saved-restored: true,271      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }272  - { id: 2, name: c, type: default, offset: 0, size: 8, alignment: 8,273      stack-id: default, callee-saved-register: '', callee-saved-restored: true,274      debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }275body:             |276  bb.0 (%ir-block.0):277    ADJCALLSTACKDOWN 0, 0, implicit-def dead $x2, implicit $x2278    $x10 = ADDI %stack.0.a, 0279    $x11 = ADDI %stack.1.b, 0280    $x12 = ADDI %stack.2.c, 0281    PseudoCALL target-flags(riscv-call) @extern, csr_ilp32d_lp64d, implicit-def dead $x1, implicit killed $x10, implicit-def $x2282    ADJCALLSTACKUP 0, 0, implicit-def dead $x2, implicit $x2283    PseudoRET284 285...286