Commit 67aca9df by Paulo Matos Committed by Eric Botcazou

combine.c (reg_nonzero_bits_for_combine): Apply mask transformation as applied…

combine.c (reg_nonzero_bits_for_combine): Apply mask transformation as applied to nonzero_sign_valid when...

	* combine.c (reg_nonzero_bits_for_combine): Apply mask transformation
	as applied to nonzero_sign_valid when last_set_mode has less precision
	than mode.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>

From-SVN: r205550
parent 483b0aa4
2013-11-30 Paulo Matos <pmatos@broadcom.com>
Eric Botcazou <ebotcazou@adacore.com>
* combine.c (reg_nonzero_bits_for_combine): Apply mask transformation
as applied to nonzero_sign_valid when last_set_mode has less precision
than mode.
2013-11-30 Tobias Burnus <burnus@net-b.de> 2013-11-30 Tobias Burnus <burnus@net-b.de>
PR sanitizer/59275 PR sanitizer/59275
...@@ -9472,7 +9472,13 @@ reg_nonzero_bits_for_combine (const_rtx x, enum machine_mode mode, ...@@ -9472,7 +9472,13 @@ reg_nonzero_bits_for_combine (const_rtx x, enum machine_mode mode,
(DF_LR_IN (ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb), (DF_LR_IN (ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb),
REGNO (x))))) REGNO (x)))))
{ {
*nonzero &= rsp->last_set_nonzero_bits; unsigned HOST_WIDE_INT mask = rsp->last_set_nonzero_bits;
if (GET_MODE_PRECISION (rsp->last_set_mode) < GET_MODE_PRECISION (mode))
/* We don't know anything about the upper bits. */
mask |= GET_MODE_MASK (mode) ^ GET_MODE_MASK (rsp->last_set_mode);
*nonzero &= mask;
return NULL; return NULL;
} }
...@@ -9505,6 +9511,7 @@ reg_nonzero_bits_for_combine (const_rtx x, enum machine_mode mode, ...@@ -9505,6 +9511,7 @@ reg_nonzero_bits_for_combine (const_rtx x, enum machine_mode mode,
if (GET_MODE_PRECISION (GET_MODE (x)) < GET_MODE_PRECISION (mode)) if (GET_MODE_PRECISION (GET_MODE (x)) < GET_MODE_PRECISION (mode))
/* We don't know anything about the upper bits. */ /* We don't know anything about the upper bits. */
mask |= GET_MODE_MASK (mode) ^ GET_MODE_MASK (GET_MODE (x)); mask |= GET_MODE_MASK (mode) ^ GET_MODE_MASK (GET_MODE (x));
*nonzero &= mask; *nonzero &= mask;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment