On Fri, Sep 06, 2024 at 12:21:20AM -0700, Andrew Pinski wrote: > This is an alternative patch to fix PR tree-optimization/116601 by factoring > out the main part of pass_fold_builtins::execute into its own function so that > we don't need to repeat the code for doing the eh cleanup. It also fixes the > problem I saw with the atomics which might skip over a statement; though I > don't > have a testcase for that.
I'm worried about using this elsewhere, various fab foldings are meant to be done only in that pass and not earlier. E.g. the __builtin_constant_p folding, __builtin_assume_aligned, stack restore, unreachable, va_{start,end,copy}. Jakub