Commit 850b8aa3 by Segher Boessenkool Committed by Segher Boessenkool

LRA: side_effects_p stmts' output is not invariant (PR89721)

PR89721 shows LRA treating an unspec_volatile's result as invariant,
which of course isn't correct.  This patch fixes it.


	PR rtl-optimization/89721
	* lra-constraints (invariant_p): Return false if side_effects_p holds.

From-SVN: r269716
parent 30bb0e44
2019-03-15 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/89721
* lra-constraints (invariant_p): Return false if side_effects_p holds.
2019-03-15 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/87532
......
......@@ -5839,6 +5839,9 @@ invariant_p (const_rtx x)
enum rtx_code code;
int i, j;
if (side_effects_p (x))
return false;
code = GET_CODE (x);
mode = GET_MODE (x);
if (code == SUBREG)
......
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