-
- Downloads
tree-optimization/113078 - conditional subtraction reduction vectorization
When if-conversion was changed to use .COND_ADD/SUB for conditional reduction it was forgotten to update reduction path handling to canonicalize .COND_SUB to .COND_ADD for vectorizable_reduction similar to what we do for MINUS_EXPR. The following adds this and testcases exercising this at runtime and looking for the appropriate masked subtraction in the vectorized code on x86. PR tree-optimization/113078 * tree-vect-loop.cc (check_reduction_path): Canonicalize .COND_SUB to .COND_ADD. * gcc.dg/vect/vect-reduc-cond-sub.c: New testcase. * gcc.target/i386/vect-pr113078.c: Likewise.
Showing
- gcc/testsuite/gcc.dg/vect/vect-reduc-cond-sub.c 29 additions, 0 deletionsgcc/testsuite/gcc.dg/vect/vect-reduc-cond-sub.c
- gcc/testsuite/gcc.target/i386/vect-pr113078.c 16 additions, 0 deletionsgcc/testsuite/gcc.target/i386/vect-pr113078.c
- gcc/tree-vect-loop.cc 7 additions, 0 deletionsgcc/tree-vect-loop.cc
Loading
Please register or sign in to comment