]> git.ipfire.org Git - thirdparty/gcc.git/commit
ifcvt: Don't speculation move inline-asm [PR102150]
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 11 Feb 2025 23:13:07 +0000 (15:13 -0800)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 12 Feb 2025 22:33:49 +0000 (14:33 -0800)
commitaa972d027437784686dfc66180dc1b640e7dbb39
tree40ec52c243a197710ea8d578488ef5dbc0f16565
parent30dfcecddc6260970924841f222402aebfbec57d
ifcvt: Don't speculation move inline-asm [PR102150]

So unlike loop invariant motion, moving an inline-asm out of an
if is not always profitable and the cost estimate for the instruction
inside inline-asm is unknown.

This is a regression from GCC 4.6 which didn't speculatively move inline-asm
as far as I can tell.
Bootstrapped and tested on x86_64-linux-gnu.

PR rtl-optimization/102150
gcc/ChangeLog:

* ifcvt.cc (cheap_bb_rtx_cost_p): Return false if the insn
has an inline-asm in it.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/ifcvt.cc