> Anyway, the 2 FIXes (or inner FIX with outer UNSIGNED_FIX) cause problems
> since the r15-2890 which removed some strict checks in ifcvt.cc on what
> SET_SRC can be actually conditionalized (I must say I'm still worried
> about the change, don't know why one can't get e.g. inline asm or
> something with UNSPEC or some complex backend specific RTLs that
> force_operand can't handle), force_operand just ICEs on it, it can only
> handle (through expand_fix) conversions from floating point to integral.
> 
> The following patch fixes this by detecting this case and just pretend
> the inner FIX isn't there, i.e. call expand_fix with the inner FIX's
> operand instead, which works and on targets like arm it will just
> create the nested FIXes again.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux and Christophe
> tested this on arm, ok for trunk?
> 
> 2025-02-27  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR rtl-optimization/117712
>       * expr.cc (force_operand): Handle {,UNSIGNED_}FIX with
>       FIX operand using expand_fix on the inner FIX operand.
> 
>       * gcc.dg/pr117712.c: New test.

Looks good to me, thanks.

-- 
Eric Botcazou


Reply via email to