alexcrichton transferred Issue #815:
Eg
ebb0(v0: i8): v1 = iconst.i8 255 ; -1i8 as u8 v2 = icmp sge v0, v1; true for v0 s> -1gets converted to
ebb0(v0: i8): v2 = icmp_imm sge v0, 255 ; never true, as an i8 is never bigger than 127The optimization should be prevented for out of bound integers, or it should convert the
255
to-1
.cc https://github.com/bjorn3/rustc_codegen_cranelift/commit/b0ecbf14a23a301183ff194ca97a62e23e2cc6f7
Last updated: Dec 23 2024 at 13:07 UTC