[llvm] [AArch64] Add patterns for add(x, trunc(shift)) (PR #168927)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 07:37:00 PST 2025
davemgreen wrote:
> This seems like a weird statement... users can write code similar to the generated sequence for divide, and see the same issue. Not sure how common code like that is, though.
>
> What's the underlying issue here, anyway? Is it just that we have two possible shifts we can fold into the add, and we're picking the wrong one?
I only noticed that late as I was rebasing it away from #168780, it did not come up as an issue in the rest of my testing. I've added a isWorthFolding check for the trunc, in case it has multiple uses.
https://github.com/llvm/llvm-project/pull/168927
More information about the llvm-commits
mailing list