We use a negative ID number to link together the doloop_begin and doloop_end instructions. This negative ID number is setup within doloop_begin, at this point the ID is stored into the loop end instruction (doloop_end_i) and placed into the doloop_begin_i instruction. In arc.c (arc_reorg) we extract the ID from the doloop_end_i instruction in order to find the matching doloop_begin_i instruction, though the ID is only used in some cases. Currently in arc_reorg when we extract the ID we negate it. This negation is invalid. The ID stored in both doloop_end_i and doloop_begin_i is already negative, the negation in arc_reorg means that if we need to use the ID to find the doloop_begin_i then we will never find it (as the IDs will never match). This commit removes the unneeded negation, moves the extraction of the ID into a more appropriately scoped block and adds a new test for this issue. gcc/ChangeLog: * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local block, and do not negate it, the stored id is already negative. gcc/testsuite/ChangeLog: * gcc.target/arc/loop-1.c: New file. Co-Authored-By: Guy Benyei <guybe@mellanox.com> From-SVN: r246933
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
arc-arch.h | Loading commit data... | |
arc-arches.def | Loading commit data... | |
arc-c.c | Loading commit data... | |
arc-c.def | Loading commit data... | |
arc-cpus.def | Loading commit data... | |
arc-modes.def | Loading commit data... | |
arc-options.def | Loading commit data... | |
arc-opts.h | Loading commit data... | |
arc-protos.h | Loading commit data... | |
arc-simd.h | Loading commit data... | |
arc-tables.opt | Loading commit data... | |
arc.c | Loading commit data... | |
arc.h | Loading commit data... | |
arc.md | Loading commit data... | |
arc.opt | Loading commit data... | |
arc600.md | Loading commit data... | |
arc700.md | Loading commit data... | |
arcEM.md | Loading commit data... | |
arcHS.md | Loading commit data... | |
atomic.md | Loading commit data... | |
big.h | Loading commit data... | |
builtins.def | Loading commit data... | |
constraints.md | Loading commit data... | |
driver-arc.c | Loading commit data... | |
elf.h | Loading commit data... | |
fpu.md | Loading commit data... | |
fpx.md | Loading commit data... | |
genmultilib.awk | Loading commit data... | |
genoptions.awk | Loading commit data... | |
linux.h | Loading commit data... | |
predicates.md | Loading commit data... | |
simdext.md | Loading commit data... | |
t-arc | Loading commit data... | |
t-multilib | Loading commit data... |