gimple: allow fold_stmt without setting cfun in case of GIMPLE_COND folding
This is the followup mentioned in https://gcc.gnu.org/pipermail/gcc-patches/2025-May/683444.html .
It adds the check for cfun before accessing function specific flags.
We handle the case where !cfun as conservative in that it the function might throw.
gcc/ChangeLog:
* gimple-fold.cc (replace_stmt_with_simplification): Check cfun before
accessing cfun.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>