You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
2.3 KiB
49 lines
2.3 KiB
; ModuleID = 'Student/task1/sy/assign_test.c'
|
|
source_filename = "Student/task1/sy/assign_test.c"
|
|
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
|
|
target triple = "arm64-apple-macosx14.0.0"
|
|
|
|
@__const.main.a = private unnamed_addr constant [2 x i32] [i32 2, i32 0], align 4
|
|
|
|
; Function Attrs: noinline nounwind optnone ssp uwtable(sync)
|
|
define i32 @main() #0 {
|
|
%1 = alloca i32, align 4
|
|
%2 = alloca float, align 4
|
|
%3 = alloca [2 x i32], align 4
|
|
store i32 0, i32* %1, align 4
|
|
store float 0x3FFCCCCCC0000000, float* %2, align 4
|
|
%4 = bitcast [2 x i32]* %3 to i8*
|
|
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %4, i8* align 4 bitcast ([2 x i32]* @__const.main.a to i8*), i64 8, i1 false)
|
|
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
|
|
%6 = load i32, i32* %5, align 4
|
|
%7 = sitofp i32 %6 to float
|
|
%8 = load float, float* %2, align 4
|
|
%9 = fmul float %7, %8
|
|
%10 = fptosi float %9 to i32
|
|
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
|
|
store i32 %10, i32* %11, align 4
|
|
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
|
|
%13 = load i32, i32* %12, align 4
|
|
ret i32 %13
|
|
}
|
|
|
|
; Function Attrs: argmemonly nofree nounwind willreturn
|
|
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
|
|
|
|
attributes #0 = { noinline nounwind optnone ssp uwtable(sync) "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="__chkstk_darwin" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.5a,+zcm,+zcz" }
|
|
attributes #1 = { argmemonly nofree nounwind willreturn }
|
|
|
|
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
|
!llvm.ident = !{!9}
|
|
|
|
!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 14, i32 0]}
|
|
!1 = !{i32 1, !"wchar_size", i32 4}
|
|
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
|
!3 = !{i32 8, !"sign-return-address", i32 0}
|
|
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
|
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
|
!6 = !{i32 7, !"PIC Level", i32 2}
|
|
!7 = !{i32 7, !"uwtable", i32 1}
|
|
!8 = !{i32 7, !"frame-pointer", i32 1}
|
|
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|