-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
In the REPL, we generated code as the following:
On aarch64, the evaluation was successful, but x86 runs into segmentation fault
; ModuleID = 'LLVMDialectModule'
source_filename = "LLVMDialectModule"
define weak_odr i64 @_RIC8poly_addxE(i64 %0) {
%2 = sitofp i64 %0 to double
%3 = call double @_RC11cos_squared(double %2)
%4 = sitofp i64 %0 to double
%5 = call double @_RC11sin_squared(double %4)
%6 = fadd double %3, %5
%7 = fptosi double %6 to i64
ret i64 %7
}
define weak_odr double @_RC11sin_squared(double %0) {
%2 = call fast double @llvm.sin.f64(double %0)
%3 = fmul double %2, %2
ret double %3
}
define weak_odr double @_RC11cos_squared(double %0) {
%2 = call fast double @llvm.cos.f64(double %0)
%3 = fmul double %2, %2
ret double %3
}
define weak_odr i64 @__repl_expr_0() {
%1 = call i64 @_RIC8poly_addxE(i64 127)
ret i64 %1
}
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.sin.f64(double) #0
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.cos.f64(double) #0
attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
!llvm.module.flags = !{!0}
!0 = !{i32 2, !"Debug Info Version", i32 3}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels