diff options
author | Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org> | 2019-07-04 06:48:42 +0000 |
---|---|---|
committer | Prathamesh Kulkarni <prathamesh3492@gcc.gnu.org> | 2019-07-04 06:48:42 +0000 |
commit | 75da268e1a563a1a52389cd2ecee12d07c45a655 (patch) | |
tree | 714da14dc584d3e6f3b168644f755d9a131ee1da /gcc/simplify-rtx.c | |
parent | 6b150619545449f40d14acb87d636535e1e838ac (diff) | |
download | gcc-75da268e1a563a1a52389cd2ecee12d07c45a655.zip gcc-75da268e1a563a1a52389cd2ecee12d07c45a655.tar.gz gcc-75da268e1a563a1a52389cd2ecee12d07c45a655.tar.bz2 |
re PR target/88833 ([SVE] Redundant moves for WHILELO-based loops)
2019-07-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR target/88833
* fwprop.c (reg_single_def_p): New function.
(propagate_rtx_1): Add unconditional else inside RTX_EXTRA case.
(forward_propagate_into): New parameter reg_prop_only
with default value false.
Propagate def's src into loop only if SET_SRC and SET_DEST
of def_set have single definitions.
Likewise if reg_prop_only is set to true.
(fwprop): New param fwprop_addr_p.
Integrate fwprop_addr into fwprop.
(fwprop_addr): Remove.
(pass_rtl_fwprop_addr::execute): Call fwprop with arg set
to true.
(pass_rtl_fwprop::execute): Call fwprop with arg set to false.
* simplify-rtx.c (simplify_subreg): Add case for vector comparison.
* config/i386/sse.md (UNSPEC_BLENDV): Adjust pattern.
testsuite/
* gfortran.dg/pr88833.f90: New test.
From-SVN: r273040
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 89a46a9..dd2acd4 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -6697,6 +6697,17 @@ simplify_subreg (machine_mode outermode, rtx op, } } + /* If OP is a vector comparison and the subreg is not changing the + number of elements or the size of the elements, change the result + of the comparison to the new mode. */ + if (COMPARISON_P (op) + && VECTOR_MODE_P (outermode) + && VECTOR_MODE_P (innermode) + && known_eq (GET_MODE_NUNITS (outermode), GET_MODE_NUNITS (innermode)) + && known_eq (GET_MODE_UNIT_SIZE (outermode), + GET_MODE_UNIT_SIZE (innermode))) + return simplify_gen_relational (GET_CODE (op), outermode, innermode, + XEXP (op, 0), XEXP (op, 1)); return NULL_RTX; } |