fitzgen commented on Issue #1095:
I'll work on this.
fitzgen assigned Issue #1095:
Eg
ebb0(v0: i8): v1 = iconst.i8 255 ; -1i8 as u8 v2 = icmp sge v0, v1; true for v0 s> -1
gets converted to
ebb0(v0: i8): v2 = icmp_imm sge v0, 255 ; never true, as an i8 is never bigger than 127
The 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
fitzgen closed Issue #1095 (assigned to fitzgen):
Eg
ebb0(v0: i8): v1 = iconst.i8 255 ; -1i8 as u8 v2 = icmp sge v0, v1; true for v0 s> -1
gets converted to
ebb0(v0: i8): v2 = icmp_imm sge v0, 255 ; never true, as an i8 is never bigger than 127
The 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 12:05 UTC