[TER] PR target/48863 : Don't replace expressions across local register variable...
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 24 Nov 2016 15:22:34 +0000 (15:22 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Thu, 24 Nov 2016 15:22:34 +0000 (15:22 +0000)
commit33a002b0ab6f8827631cc50eddaa2b2d4aa1bd35
tree960f57941e1d68bf6fbaa417e6a1f47b87b5e2d0
parent4da41abf84cc6796aa8b3ae38402ff7544dfc8d3
[TER] PR target/48863 : Don't replace expressions across local register variable definitions

PR target/48863
PR inline-asm/70184
* tree-ssa-ter.c (temp_expr_table): Add reg_vars_cnt field.
(new_temp_expr_table): Initialise reg_vars_cnt.
(free_temp_expr_table): Release reg_vars_cnt.
(process_replaceable): Add reg_vars_cnt argument, set reg_vars_cnt
field of TAB.
(find_replaceable_in_bb): Use the above to record register variable
write occurrences and cancel replacement across them.

* gcc.target/arm/pr48863.c: New test.

From-SVN: r242840
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr48863.c [new file with mode: 0644]
gcc/tree-ssa-ter.c