Closed ZuseZ4 closed 10 months ago
after simplification :
; Function Attrs: mustprogress noinline nonlazybind sanitize_hwaddress willreturn uwtable
define internal noundef float @preprocess__ZN6struct3sin17hec82b97809b00bbeE(ptr noalias nocapture noundef readonly align 4 dereferenceable(8) %0) unnamed_addr #100 {
%2 = getelementptr inbounds %2, ptr %0, i64 0, i32 1
%3 = load i16, ptr %2, align 4, !noundef !4
%4 = getelementptr inbounds %2, ptr %0, i64 0, i32 2
%5 = load i16, ptr %4, align 2, !noundef !4
%6 = icmp slt i16 %3, %5
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load float, ptr %0, align 4, !noundef !4
%9 = tail call float @llvm.sin.f32(float %8) #101
ret float %9
10: ; preds = %1
tail call void @_ZN4core9panicking5panic17h9a6a4d6bf7daca76E(ptr noalias noundef nonnull readonly align 1 @anon.ecad6efadb6fdfe82af63b640f604887.17, i64 noundef 29, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.ecad6efadb6fdfe82af63b640f604887.18) #102
unreachable
}
; Function Attrs: mustprogress noinline nonlazybind sanitize_hwaddress willreturn memory(readwrite) uwtable
define internal void @diffe_ZN6struct3sin17hec82b97809b00bbeE(ptr noalias nocapture noundef readonly align 4 dereferenceable(8) %0, ptr nocapture align 4 %1, float %2) unnamed_addr #101 {
%4 = getelementptr inbounds %2, ptr %0, i64 0, i32 1
%5 = load i16, ptr %4, align 4, !alias.scope !48573, !noalias !48576, !noundef !4
%6 = getelementptr inbounds %2, ptr %0, i64 0, i32 2
%7 = load i16, ptr %6, align 2, !alias.scope !48573, !noalias !48576, !noundef !4
%8 = icmp slt i16 %5, %7
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load float, ptr %0, align 4, !alias.scope !48573, !noalias !48576, !noundef !4
%11 = call fast float @llvm.cos.f32(float %10)
%12 = fmul fast float %2, %11
%13 = load float, ptr %1, align 4, !alias.scope !48576, !noalias !48573
%14 = fadd fast float %13, %12
store float %14, ptr %1, align 4, !alias.scope !48576, !noalias !48573
ret void
15: ; preds = %3
tail call void @_ZN4core9panicking5panic17h9a6a4d6bf7daca76E(ptr noalias noundef nonnull readonly align 1 @anon.ecad6efadb6fdfe82af63b640f604887.17, i64 noundef 29, ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @anon.ecad6efadb6fdfe82af63b640f604887.18) #102
unreachable
}
odd ?
Main reads from stdin, as discussed on call. When passing data it runs fine.