Description
In CodeGen_LLVM, we call try_to_fold_vector_reduce<Call>
on saturating_add
or saturating_sub
calls, while not providing information as to whether or not the accumulation is an addition or a subtraction:
This seems like incorrect behavior - I noticed this while restructuring CodeGen_X86 into separate optimization and code generation passes, because it appears that the accumulating saturating dot product instructions should trigger on both of these patterns:
saturating_sub(wild_i32x, VectorReduce(SaturatingAdd, factor=4, widening_mul(wild_i16x, wild_i16x)))
saturating_add(wild_i32x, VectorReduce(SaturatingAdd, factor=4, widening_mul(wild_i16x, wild_i16x)))
Metadata
Metadata
Assignees
Labels
No labels