Closed regehr closed 7 months ago
regehr@john-home:~/tmp$ cat src.ll source_filename = "M2" target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "aarch64-linux-gnu" define double @f(i64 %0) { %2 = icmp eq i64 %0, 0 %3 = uitofp i1 %2 to double ret double %3 } regehr@john-home:~/tmp$ cat tgt.ll source_filename = "M2" target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "aarch64-linux-gnu" ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) define double @f(i64 %0) local_unnamed_addr #0 { arm_tv_entry: %a4_5 = icmp eq i64 %0, 0 %a5_8 = select i1 %a4_5, i64 4607182418800017408, i64 0 %a6_2 = bitcast i64 %a5_8 to double ret double %a6_2 } attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) } regehr@john-home:~/tmp$ ~/alive2-regehr/build/alive-tv src.ll tgt.ll ---------------------------------------- define double @f(i64 %#0) { #1: %#2 = icmp eq i64 %#0, 0 %#3 = uitofp i1 %#2 to double ret double %#3 } => define double @f(i64 %#0) nofree willreturn memory(none) { arm_tv_entry: %a4_5 = icmp eq i64 %#0, 0 %a5_8 = select i1 %a4_5, i64 4607182418800017408, i64 0 %a6_2 = bitcast i64 %a5_8 to double ret double %a6_2 } /home/regehr/alive2-regehr/ir/type.cpp:449:58: runtime error: reference binding to null pointer of type 'const struct FloatType' regehr@john-home:~/tmp$