michaelselehov wrote:

On AMDGPU this phantom saving made SLP vectorize f64 reduction trees in a 
RAJAPerf kernel (EDGE3D). gfx942 has no packed f64 ALU, so the vector code is 
scalarized again, and the kernel went from 446 to 512 registers with 540 bytes 
per lane of spills into scratch. It ran 4x slower on MI300X and 3.5x slower on 
MI350X. With this patch the kernel is back to 446 registers, no scratch, and 
the original speed.

The check compares the vector cost, not the scalar cost, because some folds 
exist only for vector types (the AArch64 bit select). The alternate nodes split 
lanes with isAlternateInstruction, so compares with the same opcode and 
different predicates are checked separately. The X86 remark test shows this 
case: the decision does not change, but the cost does.


https://github.com/llvm/llvm-project/pull/241758
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to