+2016-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * combine.c (change_zero_ext): Skip generation of redundant AND.
+
2016-12-19 Krister Walfridsson <krister.walfridsson@gmail.com>
* config/netbsd.h (LINK_EH_SPEC): Define.
else
continue;
- wide_int mask = wi::mask (size, false, GET_MODE_PRECISION (mode));
- x = gen_rtx_AND (mode, x, immed_wide_int_const (mask, mode));
+ if (!(GET_CODE (x) == LSHIFTRT
+ && CONST_INT_P (XEXP (x, 1))
+ && size + INTVAL (XEXP (x, 1)) == GET_MODE_PRECISION (mode)))
+ {
+ wide_int mask = wi::mask (size, false, GET_MODE_PRECISION (mode));
+ x = gen_rtx_AND (mode, x, immed_wide_int_const (mask, mode));
+ }
SUBST (**iter, x);
changed = true;