https://github.com/steffenlarsen commented:

The solution looks alright to me, but I wonder if this could be implemented by 
hoisting the accumulator instead and then relying on the existing constant 
folding to bring the constants down. That is:
```
x := amdgcn.{s,u}dot{2,4,8}(a, b, C)
y := x +/- K
->
x := C +/- K
y := dot(a, b, x)
```
This would avoid us needing to compute +/- and instead just hoist for all 
OpCodes we know are well-behaved w.r.t. this, so it would be extendible in the 
future (if it would ever make sense.)

I suppose the biggest question (aside from correctness) is whether this would 
make sense to do always, or only if we know both sides are constants.

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

Reply via email to