Stream: git-cranelift

Topic: cranelift / Issue #896 icmp_imm implemented incorrectly f...


view this post on Zulip GitHub (Feb 28 2020 at 23:26):

alexcrichton transferred Issue #896:

https://github.com/CraneStation/cranelift/blob/57fa45c8520110ee7e9b216538f1990376aed0e9/cranelift-codegen/meta/src/shared/legalize.rs#L434-L435

For example

v0 = iconst.i8 -128
v1 = iconst.i8 -128
v2 = icmp ne v0, v1

gets turned into:

v7 = iconst.i32 -128
v0 = ireduce.i8 v7
v9 = uextend.i32 v0
v2 = icmp_imm ne v9, -128

Which is equal to:

v9 = iconst.i32 128
v2 = icmp_imm ne v9, -128

That is obviously false.


Last updated: Dec 23 2024 at 14:03 UTC