]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix tree-opt/PR106087: ICE with inline-asm with multiple output and assigned only...
authorAndrew Pinski <apinski@marvell.com>
Thu, 7 Jul 2022 22:06:19 +0000 (22:06 +0000)
committerAndrew Pinski <apinski@marvell.com>
Sat, 9 Jul 2022 01:17:46 +0000 (01:17 +0000)
commit71e3daa31cfa35ee58e5899cb00767be92227fd2
treefa19f95177e47f1eefd2e95758fcac42be873d2f
parent0fe604a2d93168c8d19db83edf8a7f806aa4fe69
Fix tree-opt/PR106087: ICE with inline-asm with multiple output and assigned only static vars

The problem here is that when we mark the ssa name that was referenced in the now removed
dead store (to a write only static variable), the inline-asm would also be removed
even though it was defining another ssa name. This fixes the problem by checking
to make sure that the statement was only defining one ssa name.

Committed as approved after a bootstrapped and tested on x86_64 with no regressions.

PR tree-optimization/106087

gcc/ChangeLog:

* tree-ssa-dce.cc (simple_dce_from_worklist): Check
to make sure the statement is only defining one operand.

gcc/testsuite/ChangeLog:

* gcc.c-torture/compile/inline-asm-1.c: New test.
gcc/testsuite/gcc.c-torture/compile/inline-asm-1.c [new file with mode: 0644]
gcc/tree-ssa-dce.cc