Hi! On Mon, Mar 09, 2020 at 01:54:53PM +0100, Richard Biener wrote: > I think memory operands are fine - my original concern was about > register outputs and SSA form that should reflect the correct def > on the EH vs non-EH edge. From a "miscompile" perspective > doing nothig which means pretending the asm actually set the output > could lead us to false DCE of the old value: > > int foo = 0 > try > { > asm volatile ("..." : "=r" (foo)); > } > catch (...whatever...) > { > foo should be still zero, but SSA doesn't have the correct use > here > } > > that means the compiler really assumes the asm will populate the outputs > even when it throws.
How is memory any different here? In both cases you do not know if it is the old value or some new value in foo, after it threw an exception. Segher