cranelift: simplify icmp against UMAX/SMIN/SMAX#6037
Conversation
cfallin
left a comment
There was a problem hiding this comment.
These all look correct to me -- thanks!
I'll note a stylistic thought (but I don't think any change is needed): I noticed the @-bindings in the left-hand sides are sometimes unused; I assume the intent of e.g. umin @ ... is to document the value at a glance? I do actually like that, but just wanted to call it out and my interpretation of it in case anyone else has thoughts. It's not an idiom I've seen before in our rules.
Could you add some egraph tests to show these rewrites happening, as well? (See files in cranelift/filetests/filetests/egraph/ for examples.) With that, I think this is good to merge.
Yes, the unused |
|
No, I like the variable-bindings-as-documentation pattern actually; this LGTM. Thanks! |
Adds the following rewrites:
Also adds
ty_umin,ty_umax,ty_sminandty_smaxconstructors