HomePhabricator

Match types of accumulator and result for llvm.experimental.vector.reduce.
7cb5c154450dUnpublished

Authored by sdesmalen on May 20 2019, 2:54 AM.

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Match types of accumulator and result for llvm.experimental.vector.reduce.fadd/fmul

The scalar start/accumulator value of the fadd- and fmul reduction
should match the result type of the reduction, as well as the vector
element-type of the input vector. Although this was not explicitly
specified in the LangRef, it was taken for granted in code implementing
the reductions. The patch also fixes the LangRef by adding this
constraint.

Reviewed By: aemerson, nikic

Differential Revision: https://reviews.llvm.org/D60260

llvm-svn: 361133