https://github.com/pcc created https://github.com/llvm/llvm-project/pull/141716
isProfitableToSinkOperands() may now return a phi node. If it does, check that all incoming values are identical and if so, replace the phi use with a clone of the incoming value. Use this mechanism to sink phi node operands of shifts whose incoming values are identical casts of a constant. This could be improved a bit by changing the isProfitableToSinkOperands() API so that we don't need to call hasIdenticalValue() again in the caller but hopefully the case of a PHI operand to a shift is rare enough that it doesn't matter that we need to do it multiple times. _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits