[llvm] [RISCV] Select and/or/xor with certain constants to Zbb ANDN/ORN/XNOR (PR #120221)

Piotr Fusik via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 18 06:02:45 PST 2024


pfusik wrote:

> Here's a rough sketch using a ComplexPattern instead of PatLeaf/SDNodeXForm.

This works great!

I didn't even have to special-case `and` for `sll+srl` etc. But I don't know why. Does the pattern order matter or is there some scoring mechanism?

https://github.com/llvm/llvm-project/pull/120221


More information about the llvm-commits mailing list