Instead of only trying to constant fold the select arms, try to simplify them. This subsumes https://github.com/llvm/llvm-project/pull/115969 which implements this for extractvalue only. This is still fairly limited in that we will usually only call FoldOpIntoSelect in the first place if we have a constant operand. This can be relaxed in the future if worthwhile.
217 KiB
217 KiB