MacDue wrote: I think the utility of your change would be more apparent if you pre-comitted some tests. IIUC this is folding things like: ``` and w8, w9, w8 cmp w8, #0 ``` to ``` tst w9, w8 ``` ? https://github.com/llvm/llvm-project/pull/153608