[llvm] [Mips] Do not fold select(cond, binop(x, a), binop(x, b)) when the a/b is legal imm (PR #212163)
Keith Dunwoody via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 11:57:14 PDT 2026
keithdunwoody wrote:
> As an alternative have you looked at performing this as a fixup in MipsISelDAGToDAG?
I had originally considered this; but it seemed awkward to have the combiner do one transformation, only to then match and undo the transformation in the backend.
There also seemed to be a general pattern where many combiners would have some kind of hook for "is this operation efficient for this architecture" or "is this operation legal on this arch which will make this combiner efficient/inefficient".
Not that this isn't possible, that's was just my reasoning for choosing this approach.
https://github.com/llvm/llvm-project/pull/212163
More information about the llvm-commits
mailing list