35 lines
1.3 KiB
LLVM
35 lines
1.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc -mtriple=riscv32 -mcpu=ventus-gpgpu -verify-machineinstrs -O0 \
|
|
; RUN: -asm-verbose < %s | FileCheck -check-prefix=VENTUS %s
|
|
|
|
; VENTUS: .section .rodata.ventus.resource,"w",@progbits
|
|
; VENTUS: .half 2
|
|
; VENTUS: .half 5
|
|
; VENTUS: .half 4
|
|
; VENTUS: .half 0
|
|
define dso_local ventus_kernel void @usage(ptr addrspace(1) nocapture noundef align 4 %b, ptr addrspace(3) nocapture noundef readonly align 4 %a) local_unnamed_addr #0 {
|
|
; VENTUS-LABEL: usage:
|
|
; VENTUS: # %bb.0: # %entry
|
|
; VENTUS-NEXT: addi sp, sp, 4
|
|
; VENTUS-NEXT: sw ra, -4(sp) # 4-byte Folded Spill
|
|
; VENTUS-NEXT: lw t1, 0(a0)
|
|
; VENTUS-NEXT: lw t0, 4(a0)
|
|
; VENTUS-NEXT: # kill: def $v0 killed $x5
|
|
; VENTUS-NEXT: # kill: def $v0 killed $x6
|
|
; VENTUS-NEXT: lw t2, 0(t0)
|
|
; VENTUS-NEXT: lw t0, 0(t1)
|
|
; VENTUS-NEXT: add t0, t0, t2
|
|
; VENTUS-NEXT: sw t0, 0(t1)
|
|
; VENTUS-NEXT: lw ra, -4(sp) # 4-byte Folded Reload
|
|
; VENTUS-NEXT: addi sp, sp, -4
|
|
; VENTUS-NEXT: ret
|
|
entry:
|
|
%0 = load i32, ptr addrspace(3) %a, align 4
|
|
%1 = load i32, ptr addrspace(1) %b, align 4
|
|
%add = add nsw i32 %1, %0
|
|
store i32 %add, ptr addrspace(1) %b, align 4
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) "frame-pointer"="all"}
|