binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

[OptimizeInstructions] Canonicalizations for relational ops near signed & unsigned min/max

Open MaxGraey opened this issue 2 years ago • 2 comments

It's continue of #4272

(signed)x  < s_min + 1   ==>   x == s_min
(signed)x >= s_min + 1   ==>   x != s_min
(signed)x  > s_max - 1   ==>   x == s_max
(signed)x <= s_max - 1   ==>   x != s_max

(unsigned)x <= u_max - 1   ==>   x == u_max
(unsigned)x  > u_max - 1   ==>   x != u_max

MaxGraey avatar Oct 27 '21 13:10 MaxGraey

Fuzzed ITERATION: 14043

MaxGraey avatar Oct 27 '21 19:10 MaxGraey

@kripken @tlively Could you take a look to this please?

MaxGraey avatar Jan 27 '22 19:01 MaxGraey

@tlively Could you take a little look at this old PR please?

MaxGraey avatar Aug 25 '22 16:08 MaxGraey

@tlively Thanks!

MaxGraey avatar Aug 27 '22 03:08 MaxGraey