int32-sum-narrow-accint32 sum into an accumulator narrower than int64
Reported by --explain after a verdict.
mettle explain int32-sum-narrow-acc
Same rule as byte-sum-narrow-acc, one width up. The int32 sum kernel (vpaddd) folds eight lanes into an int64 accumulator, because eight int32 values summed can overflow int32 while the scalar loop, adding one at a time, would not have.
Fix: declare the accumulator int64. The elements stay int32; only the running total widens.
Related
- call-in-bodyThe loop body calls a function
- extern-call-in-bodyThe loop body calls an external function
- indirect-callThe loop body calls through a function pointer
- alloc-in-bodyThe loop body allocates
- inline-asmThe loop body contains inline assembly
- control-flowThe loop body branches
- early-exitThe loop can leave before its trip count
- int16-elements16-bit integer elements have no kernel