It uses the same list of valid immediates for and/or/xor as for add/sub/mul but it is much more subtle, see: https://dinfuehr.github.io/blog/encoding-of-immediate-values-on-aarch64/. This is fine for now by chance, but changing the layout of ArithProfile can cause us to emit invalid constants in the generated assembly (this is blocking https://bugs.webkit.org/show_bug.cgi?id=202832).
Created attachment 382616 [details] Patch
Created attachment 382618 [details] Patch
Created attachment 382626 [details] Patch remove now obsolete/wrong assert.
Comment on attachment 382626 [details] Patch r=me
Comment on attachment 382626 [details] Patch Clearing flags on attachment: 382626 Committed r251966: <https://trac.webkit.org/changeset/251966>
All reviewed patches have been landed. Closing bug.
<rdar://problem/56842399>