RISC-V: Add type attribute in *<optab>_not_const<mode> pattern

Message ID CAHso6sOV8pnQfLSsMLL7NQH-7vwy1MNK=7XcMjpg9-m0kMZiJg@mail.gmail.com
State Unresolved
Headers
Series RISC-V: Add type attribute in *<optab>_not_const<mode> pattern |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jivan Hakobyan Sept. 29, 2023, 10:53 p.m. UTC
  After f088b768d01a commit riscv_sched_variable_issue function requires
that all insns should have a type attribute.

When I sent my previous patch there was no such limitation.
Currently, I have regressions on my tests. This patch fixes them.

gcc/ChangeLog:
        * config/riscv/bitmanip.md (*<optab>_not_const<mode>): Added type
attribute
  

Comments

Jeff Law Sept. 30, 2023, 3:22 a.m. UTC | #1
On 9/29/23 16:53, Jivan Hakobyan wrote:
> After f088b768d01a commit riscv_sched_variable_issue function requires
> that all insns should have a type attribute.
> 
> When I sent my previous patch there was no such limitation.
> Currently, I have regressions on my tests. This patch fixes them.
> 
> gcc/ChangeLog:
>          * config/riscv/bitmanip.md (*<optab>_not_const<mode>): Added 
> type attribute
I should have remembered that we've got a policy that all insns need a 
type.  My bad.

Pushed to the trunk,
jeff
  

Patch

diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md
index 977be350ce3..f890280c295 100644
--- a/gcc/config/riscv/bitmanip.md
+++ b/gcc/config/riscv/bitmanip.md
@@ -225,7 +225,9 @@  (define_insn_and_split "*<optab>_not_const<mode>"
   "#"
   "&& reload_completed"
   [(set (match_dup 3) (match_dup 2))
-   (set (match_dup 0) (bitmanip_bitwise:X (not:X (match_dup 1)) (match_dup 3)))])
+   (set (match_dup 0) (bitmanip_bitwise:X (not:X (match_dup 1)) (match_dup 3)))]
+  ""
+  [(set_attr "type" "bitmanip")])
 
 ;; '(a >= 0) ? b : 0' is emitted branchless (from if-conversion).  Without a
 ;; bit of extra help for combine (i.e., the below split), we end up emitting