[llvm] [SystemZ] Fold i16/i32/i64 logical RMW operations into memory operands in DAGToDAG (PR #192802)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 04:28:26 PDT 2026


https://github.com/uweigand commented:

I'm wondering why this needs to be done in DAGToDAG.   The existing routine is necessary *only* for the Add/Sub-With-Overflow cases where we have an outgoing overflow flag - RMW operations with outgoings flags cannot be matched via TableGen.

Note that all other RMW operations *are* matched via TableGen, this includes the "regular" variants of Add/Sub (via `BinarySIY`), as well as the existing And/Or/Xor byte operations (via `RMWIByte`).

My understanding is that everything that can be done via TableGen should be done there rather than further extending the DAGToDAG special cases (instead, ideally TableGen should be enhanced to also support those cases in the future).

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


More information about the llvm-commits mailing list