https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102150

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Created attachment 60465 [details]
> 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).

So looking into the code of movement_possibility_1, it turns out it already
returns MOVE_IMPOSSIBLE because inline-asm is NOT a gimple assign.
I need to read the RTL level invariant motion pass now.

Reply via email to