https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102150
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 60465 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60465&action=edit Path for the ifcvt case Note this patch does NOT change the definition of trapping but it does fix a costing issue that could show up. speculatively executing an expensive instruction via an inline-asm is definitely a shocker for ifcvt; this is unlike moving invariants out of a loop where the cost might be not as bad. Note I have not looked into invariant motion either because we might not want to do full on speculatively execution there either (there is some code on the gimple level to prevent some speculatively execution motion for LIM which could be expanded to return MOVE_PRESERVE_EXECUTION for inline-asm too).