MaxGraey commented on Issue #2022:
Alright. I removed rule but keep
bnotinstruction code for peepmatic
MaxGraey commented on Issue #2022:
the new backend(s) that are under development, could easily enough match that in their instruction selectors and directly emit a not insn as appropriate. There's no requirement for any more heavyweight
btw one potential goal of early tranformation
x ^ -1to~xmight be canonization for further iterations / post-optimizations. Although I probably didn't go deep into the details of the cranelift architecture and if your pipeline uses only single passes forpre-opt-> post-opt -> target codegenchain this no big deal
MaxGraey edited a comment on Issue #2022:
the new backend(s) that are under development, could easily enough match that in their instruction selectors and directly emit a not insn as appropriate. There's no requirement for any more heavyweight
btw one potential goal of early tranformation
x ^ -1to~xmight be canonization for further iterations of peephole optimizations / post-optimizations. Although I probably didn't go deep into the details of the cranelift architecture and if your pipeline uses only single passes forpre-opt-> post-opt -> target codegenchain this no big deal
Last updated: Dec 06 2025 at 06:05 UTC