[llvm] [DAG] foldABSToABD - support abs(*ext(x) - *ext(y)) -> zext(abd*(x, y)) from different extension source types (PR #71670)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 10:35:24 PST 2023


RKSimon wrote:

> Would this replace a `abs+sub+sext+sext` with an `zext+abd+sext`? (Where we know the abd is legal). Would it make sense to do that even if the trunc was not free?

I'm happy to try that, I was being conservative as initially I only need to cover a few cases (it came up when looking at D152928) - maybe we just need a oneuse check?

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


More information about the llvm-commits mailing list