diff options
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index c82101c..2d169d3 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "selftest.h" #include "selftest-rtl.h" #include "rtx-vector-builder.h" +#include "rtlanal.h" /* Simplification and canonicalization of RTL. */ @@ -4201,6 +4202,15 @@ simplify_context::simplify_binary_operation_1 (rtx_code code, return trueop0; } + /* If we select a low-part subreg, return that. */ + if (vec_series_lowpart_p (mode, GET_MODE (trueop0), trueop1)) + { + rtx new_rtx = lowpart_subreg (mode, trueop0, + GET_MODE (trueop0)); + if (new_rtx != NULL_RTX) + return new_rtx; + } + /* If we build {a,b} then permute it, build the result directly. */ if (XVECLEN (trueop1, 0) == 2 && CONST_INT_P (XVECEXP (trueop1, 0, 0)) |