[llvm] [AArch64] Eliminate Common Subexpression of CSEL by Reassociation (PR #121350)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 13:02:39 PST 2025


https://github.com/davemgreen commented:

> I can add such tests but I'm wondering whether they are useful. If the SUBS has a different type than the operands of the CSEL, the operands of the SUBS used for comparison and the ADD won't match (as they must have different type) or the operands of the CSEL wouldn't be chains of ADD instructions. Hence, the transformation as implemented would not apply. Or am I missing something here?

It is just to protect against crashes - APInt doesn't look it when the bitwidths don't match.

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


More information about the llvm-commits mailing list