58 lines
2.3 KiB
LLVM
58 lines
2.3 KiB
LLVM
; ModuleID = '../../wrap/empty.c'
|
|
source_filename = "../../wrap/empty.c"
|
|
target datalayout = "e-m:e-p:32:32-v1:8:8-i64:64-i128:128-n32"
|
|
target triple = "xtensa-esp-unknown-elf"
|
|
|
|
%struct.empty = type {}
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define dso_local void @demo0(ptr dead_on_unwind noalias writable sret(%struct.empty) align 1 %0) #0 {
|
|
%2 = alloca %struct.empty, align 1
|
|
call void @llvm.memcpy.p0.p0.i32(ptr align 1 %0, ptr align 1 %2, i32 0, i1 false)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
|
|
declare void @llvm.memcpy.p0.p0.i32(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i32, i1 immarg) #1
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define dso_local void @demo1(ptr dead_on_unwind noalias writable sret(%struct.empty) align 1 %0, i32 noundef %1) #0 {
|
|
%3 = alloca %struct.empty, align 1
|
|
%4 = alloca i32, align 4
|
|
store i32 %1, ptr %4, align 4
|
|
call void @llvm.memcpy.p0.p0.i32(ptr align 1 %0, ptr align 1 %3, i32 0, i1 false)
|
|
ret void
|
|
}
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define dso_local i32 @demo2(i32 noundef %0) #0 {
|
|
%2 = alloca %struct.empty, align 1
|
|
%3 = alloca i32, align 4
|
|
store i32 %0, ptr %3, align 4
|
|
%4 = load i32, ptr %3, align 4
|
|
ret i32 %4
|
|
}
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define dso_local i32 @demo3(i32 noundef %0, i32 noundef %1) #0 {
|
|
%3 = alloca %struct.empty, align 1
|
|
%4 = alloca i32, align 4
|
|
%5 = alloca i32, align 4
|
|
store i32 %0, ptr %4, align 4
|
|
store i32 %1, ptr %5, align 4
|
|
%6 = load i32, ptr %4, align 4
|
|
%7 = load i32, ptr %5, align 4
|
|
%8 = add nsw i32 %6, %7
|
|
ret i32 %8
|
|
}
|
|
|
|
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+atomctl,+bool,+clamps,+coprocessor,+debug,+density,+dfpaccel,+div32,+exception,+fp,+highpriinterrupts,+interrupt,+loop,+mac16,+memctl,+minmax,+miscsr,+mul32,+mul32high,+nsa,+prid,+regprotect,+rvector,+s32c1i,+sext,+threadptr,+timerint,+windowed" }
|
|
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
|
|
|
|
!llvm.module.flags = !{!0, !1}
|
|
!llvm.ident = !{!2}
|
|
|
|
!0 = !{i32 1, !"wchar_size", i32 4}
|
|
!1 = !{i32 7, !"frame-pointer", i32 2}
|
|
!2 = !{!"clang version 19.1.2 (https://github.com/espressif/llvm-project 510a078c1ad4aee4460818bcb38ff0ba3fbf6a83)"}
|