diff mbox series

Fix TARGET_MEM_REF handling in PRE

Message ID nycvar.YFH.7.76.1910171157050.5566@zhemvz.fhfr.qr
State New
Headers show
Series Fix TARGET_MEM_REF handling in PRE | expand

Commit Message

Richard Biener Oct. 17, 2019, 9:58 a.m. UTC
It's not exercised but I ran into this with trying PRE after
IVOPTs.

Committed as obvious.

Richard.

2019-10-17  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Fix
	TARGET_MEM_REF creation.
diff mbox series

Patch

Index: gcc/tree-ssa-pre.c
===================================================================
--- gcc/tree-ssa-pre.c	(revision 277094)
+++ gcc/tree-ssa-pre.c	(working copy)
@@ -2492,7 +2492,7 @@  create_component_ref_by_pieces_1 (basic_
     case TARGET_MEM_REF:
       {
 	tree genop0 = NULL_TREE, genop1 = NULL_TREE;
-	vn_reference_op_t nextop = &ref->operands[++*operand];
+	vn_reference_op_t nextop = &ref->operands[(*operand)++];
 	tree baseop = create_component_ref_by_pieces_1 (block, ref, operand,
 							stmts);
 	if (!baseop)