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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org,
                   |                            |olegendo at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
While changing mdiv= from accepting a string to Enum(something) might be worth
it, wouldn't that be GCC 13 material?  I think right now -mdiv= accepts random
garbage like -mdiv=foobar .  There is also an enum already but there is no 1:1
mapping between what is assigned to sh_div_strategy from what is in sh_div_str,
and sh_div_strategy probably should be a TargetVariable.

Anyway, wouldn't the following be enough for now to just do:

2022-03-31  Jakub Jelinek  <ja...@redhat.com>

        PR target/105069
        * config/sh/sh.opt (mdiv=): Add Save.

--- gcc/config/sh/sh.opt.jj     2022-01-11 23:11:21.990295775 +0100
+++ gcc/config/sh/sh.opt        2022-03-31 09:43:45.916244944 +0200
@@ -207,7 +207,7 @@ Target RejectNegative Mask(ALIGN_DOUBLE)
 Align doubles at 64-bit boundaries.

 mdiv=
-Target RejectNegative Joined Var(sh_div_str) Init("")
+Target Save RejectNegative Joined Var(sh_div_str) Init("")
 Division strategy, one of: call-div1, call-fp, call-table.

 mdivsi3_libfunc=

The testcase doesn't ICE with it anymore, and e.g. i386.opt has various Save
strings too.

Reply via email to