Stefan Weigl-Bosker 828261ebb8
[GISel] Add G_CTLS Opcode and combines, lower to cls(w) (#175069)
Fixes https://github.com/llvm/llvm-project/issues/174369

- Added a G_CTLS opcode and some pattern matching. This is the
GlobalISel equivalent to
https://github.com/llvm/llvm-project/pull/173417
- Add legalization for aarch64 and riscv

```
// Folds (ctlz (xor x, (sra x, bitwidth-1))) -> (add (ctls x), 1). 
// Folds (ctlz (or (shl (xor x, (sra x, bitwidth-1)), 1), 1) -> (ctls x) (clang aarch64)
```
2026-01-16 13:22:18 -08:00
..
2025-08-01 07:01:50 -07:00
2025-08-01 07:01:50 -07:00