diff options
author | jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-23 00:25:34 +0000 |
---|---|---|
committer | jiez <jiez@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-23 00:25:34 +0000 |
commit | 90db8e345bd154a2ba62690b482f5a9a99a709f2 (patch) | |
tree | 58283904211d9cd8de222354920fd228773d69d3 /gcc/web.c | |
parent | bce8e7beb4db9dc2bd89cd67032c21969cee5fc2 (diff) | |
download | gcc-90db8e345bd154a2ba62690b482f5a9a99a709f2.tar.gz |
PR rtl-optimization/47763
* web.c (web_main): Ignore naked clobber when replacing register.
testsuite/
PR rtl-optimization/47763
* gcc.dg/pr47763.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170422 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/web.c')
-rw-r--r-- | gcc/web.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/web.c b/gcc/web.c index 9b849249b0d..e57bb37570f 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -377,7 +377,17 @@ web_main (void) FOR_BB_INSNS (bb, insn) { unsigned int uid = INSN_UID (insn); - if (NONDEBUG_INSN_P (insn)) + + if (NONDEBUG_INSN_P (insn) + /* Ignore naked clobber. For example, reg 134 in the second insn + of the following sequence will not be replaced. + + (insn (clobber (reg:SI 134))) + + (insn (set (reg:SI 0 r0) (reg:SI 134))) + + Thus the later passes can optimize them away. */ + && GET_CODE (PATTERN (insn)) != CLOBBER) { df_ref *use_rec; df_ref *def_rec; |