[llvm] [DAGCombiner] Combine (fshl A, X, Y) | (shl X, Y) --> fshl (A|X), X, Y (PR #180887)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 11 08:38:21 PST 2026


topperc wrote:

> > We don't need X to be the same in both sides, but that's what occurred in the pattern I was looking at.
> 
> So does the patch actually handle the more general case, something like `(fshl A, X, Y) | (shl Z, Y) --> fshl (A|Z), X, Y`? If so can you say that from the start? Using X twice in the description and then adding a note to say they're not the same is just confusing.

I wrote that poorly. What I meant to say is that the pattern is valid if X isn't the same, but what I implemented requires them to be the same.

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


More information about the llvm-commits mailing list