[llvm] [RISCV] Move strength reduction of mul X, 3/5/9*2^N to combine (PR #89966)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 10:50:38 PDT 2024
preames wrote:
@dtcxzyw Thank you for finding and reporting this code gen difference. And also, yuck!
This is actually the same issue I hit in X86 when trying to use the generic SHL_ADD node, so I've already investigated it a bit. In short, it really doesn't look like we have any good answers here. There's existing discussion around this here: https://github.com/llvm/llvm-project/pull/84921#discussion_r1523719273
My takeaway is that freeze in DAG is only half implemented, and there's really no clear good path forward.
I very reluctantly think it may be time to give up here. No other target is actually undef correct for these cases, so maybe we shouldn't bother to be either. I've posted a patch for that here: https://github.com/llvm/llvm-project/pull/90097 If by chance anyone has a better idea, I'm definitely open to it.
https://github.com/llvm/llvm-project/pull/89966
More information about the llvm-commits
mailing list