steffenlarsen wrote: > Yes, I’m planning to implement this optimization as well. For this first > step, I wanted to limit the change to constant folding and keep the patch > small and easy to review. As a follow up, I plan to handle non constant cases > when the transformation is profitable, such as folding an add into the > accumulator when the original accumulator is zero.
Is there a case where hoisting it won't be worth it? Worst case the accumulator won't fold and the addition/subtraction happens before the dot product instead of after. Could it cause worse scheduling maybe? If not, I don't think we'd need these changes if we just have hoisting and simple const-folding. https://github.com/llvm/llvm-project/pull/225002 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
