Open mrk-its opened 6 months ago
following rust program https://github.com/mrk-its/aoc2022/blob/new_rust/pi/src/main.rs
produces bad result:
$ cargo run -p pi --release 100 pi: -2147450880 47611328 cycles
changing casting to to_int_unchecked produces proper result:
to_int_unchecked
$ cargo run -p pi --release --features to_int_unchecked 100 pi: 314 47474448 cycles
This is probably because of some flaw in implementation of intrinsic(@llvm.fptosi.sat) https://github.com/llvm-mos/llvm-mos-sdk/issues/299 (https://github.com/llvm-mos/llvm-mos/commit/2372941659b7fd2cdd1e014f6fe505b032088938 https://github.com/llvm-mos/llvm-mos-sdk/pull/303)
intrinsic(@llvm.fptosi.sat)
following rust program https://github.com/mrk-its/aoc2022/blob/new_rust/pi/src/main.rs
produces bad result:
changing casting to
to_int_unchecked
produces proper result:This is probably because of some flaw in implementation of
intrinsic(@llvm.fptosi.sat)
https://github.com/llvm-mos/llvm-mos-sdk/issues/299 (https://github.com/llvm-mos/llvm-mos/commit/2372941659b7fd2cdd1e014f6fe505b032088938 https://github.com/llvm-mos/llvm-mos-sdk/pull/303)