Skip to content
Snippets Groups Projects
Commit ccb68179 authored by Richard Sandiford's avatar Richard Sandiford
Browse files

auto-inc-dec: Don't add incs/decs to bare CLOBBERs [PR93124]

In this PR, auto-inc-dec was trying to turn:

    (set (reg X) (plus (reg X) (const_int N)))
    (clobber (mem (reg X)))

into:

    (clobber (mem (pre_modify (reg X) ...)))

But bare clobber insns are just there to describe dataflow.  They're
not supposed to generate any code.

2020-01-23  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR rtl-optimization/93124
	* auto-inc-dec.c (merge_in_block): Don't add auto inc/decs to
	bare USE and CLOBBER insns.

gcc/testsuite/
	* gcc.dg/torture/pr93124.c: New test.
parent 92bea423
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment