llvm-project
796a67e0 - [AMDGPU] Fold add of a variable into a zero dot accumulator

Commit
3 days ago
[AMDGPU] Fold add of a variable into a zero dot accumulator When the dot intrinsic has a zero accumulator, no clamp and a single add user, fold the add operand into the accumulator: ```llvm %dot = call i32 @llvm.amdgcn.sdot4(i32 %a, i32 %b, i32 0, i1 false) %r = add i32 %dot, %x => %r = call i32 @llvm.amdgcn.sdot4(i32 %a, i32 %b, i32 %x, i1 false) ``` If %x is defined after the dot in the same block, the dot is moved down to the add. The fold is skipped across blocks to avoid sinking the dot into a loop.
Author
Committer
Parents
Loading