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

            Bug ID: 104840
           Summary: [nvptx] Can't set predicable attribute to true
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

The nvptx port has:
...
(define_attr "predicable" "false,true"
  (const_string "true"))
...
and here and there:
...
  [(set_attr "predicable" "false")])
...
but when changing one of those to "true" I get:
...
/home/vries/oacc/trunk/source-gcc/gcc/config/nvptx/nvptx.md:2273:1: unknown
value `true' for attribute `ce_enabled'
make[2]: *** [Makefile:2493: s-attrtab] Error 1
...

All the other ports seem to use no,yes instead:
...
$ grep predicable gcc/config/*/*.md | grep define_attr
gcc/config/arc/arc.md:(define_attr "predicable" "no,yes" (const_string "no"))
gcc/config/arm/arm.md:(define_attr "predicable_short_it" "no,yes" (const_string
"no"))
gcc/config/arm/arm.md:(define_attr "predicable" "no,yes" (const_string "no"))
gcc/config/c6x/c6x.md:(define_attr "predicable" "no,yes"
gcc/config/ia64/ia64.md:(define_attr "predicable" "no,yes" (const_string
"yes"))
gcc/config/nvptx/nvptx.md:(define_attr "predicable" "false,true"
...

In the documentation (
https://gcc.gnu.org/onlinedocs/gccint/Conditional-Execution.html ) we have:
...
When define_cond_exec is used, an implicit reference to the predicable
instruction attribute is made. See Insn Attributes. This attribute must be a
boolean (i.e. have exactly two elements in its list-of-values), with the
possible values being no and yes.
...

So, it seems false,true is not allowed.

Here though, a bit later on the same doc page we have wording that uses "true":
...
For each define_insn for which the predicable attribute is true
...

Reply via email to