[llvm] [X86] Fold some (truncate (srl (add X, C1), C2)) patterns to (add (truncate (srl X, C2)), C1') (PR #126448)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 12 19:39:13 PST 2025


=?utf-8?q?João?= Gouveia <jtalonegouveia at gmail.com>,
=?utf-8?q?João?= Gouveia <jtalonegouveia at gmail.com>,
=?utf-8?q?João?= Gouveia <jtalonegouveia at gmail.com>,
=?utf-8?q?João?= Gouveia <jtalonegouveia at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/126448 at github.com>


phoebewang wrote:

> [eb2f176d67cdf1955a90e71e25d6d39910d723d4e0b8a9bf8dfa229d3a6b2c1eR53685-R53686](https://github.com/llvm/llvm-project/commit/b773400981d8ca97de016f6acbe02e71b30b5779#diff-eb2f176d67cdf1955a90e71e25d6d39910d723d4e0b8a9bf8dfa229d3a6b2c1eR53685-R53686)), should I remove it entirely?

This reminds me can we expand it to AND/XOR/OR/SUB, maybe in a follow up patch? Then I think we can remove it. For i64, it seems only the constant fold is benefit.

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


More information about the llvm-commits mailing list