Commit 5d4c34aa by Claudiu Zissulescu Committed by Claudiu Zissulescu

[ARC] Update uses for hw-loop labels.

Make sure we mark the hw-loop labels as beeing used.

gcc/
2017-09-19  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
	labels number of usages.

gcc/testsuite
2017-09-19  Claudiu Zissulescu  <claziss@synopsys.com>

	* gcc.target/arc/loop-2.cpp: New test.

From-SVN: r255274
parent 31e72f4f
2017-11-30 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
labels number of usages.
2017-11-30 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_cannot_substitue_mem_equiv_p): New
function.
(TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.
......@@ -7501,6 +7501,9 @@ hwloop_optimize (hwloop_info loop)
/* Insert the loop end label before the last instruction of the
loop. */
emit_label_after (end_label, loop->last_insn);
/* Make sure we mark the begining and end label as used. */
LABEL_NUSES (loop->end_label)++;
LABEL_NUSES (loop->start_label)++;
return true;
}
......
2017-11-30 Claudiu Zissulescu <claziss@synopsys.com>
* gcc.target/arc/loop-2.cpp: New test.
2017-11-30 Claudiu Zissulescu <claziss@synopsys.com>
* gcc.target/arc/lra-1.c: New test.
2017-11-30 Will Schmidt <will_schmidt@vnet.ibm.com>
......
/* { dg-options "-O2" } *
/* { dg-do assemble } */
/* This file fails to assemble if we forgot to increase the number of
uses for loop's start and end labels. */
int a, c, d;
int *b;
void fn1(int p1) {
if (d == 5)
for (int i; i < p1; ++i)
if (c)
b[i] = c;
else
int t = a = t;
else
for (int i; i < p1; ++i)
b[i] = 0;
}
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