]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Add a new constraint to ensure that the vl of XTheadVector does not get a...
authorJin Ma <jinma@linux.alibaba.com>
Tue, 21 Jan 2025 17:46:37 +0000 (10:46 -0700)
committerJeff Law <jlaw@ventanamicro.com>
Tue, 21 Jan 2025 17:47:18 +0000 (10:47 -0700)
Although we have handled the vl of XTheadVector correctly in the
expand phase and predicates, the results show that the work is
still insufficient.

In the curr_insn_transform function, the insn is transformed from:
(insn 69 67 225 12 (set (mem:RVVM8SF (reg/f:DI 218 [ _77 ]) [0  S[128, 128] A32])
        (if_then_else:RVVM8SF (unspec:RVVMF4BI [
                    (const_vector:RVVMF4BI repeat [
                            (const_int 1 [0x1])
                        ])
                    (reg:DI 209)
                    (const_int 0 [0])
                    (reg:SI 66 vl)
                    (reg:SI 67 vtype)
                ] UNSPEC_VPREDICATE)
            (reg/v:RVVM8SF 143 [ _xx ])
            (mem:RVVM8SF (reg/f:DI 218 [ _77 ]) [0  S[128, 128] A32])))
     (expr_list:REG_DEAD (reg/v:RVVM8SF 143 [ _xx ])
        (nil)))
to
(insn 69 284 225 11 (set (mem:RVVM8SF (reg/f:DI 18 s2 [orig:218 _77 ] [218]) [0  S[128, 128] A32])
        (if_then_else:RVVM8SF (unspec:RVVMF4BI [
                    (const_vector:RVVMF4BI repeat [
                            (const_int 1 [0x1])
                        ])
                    (const_int 1 [0x1])
                    (const_int 0 [0])
                    (reg:SI 66 vl)
                    (reg:SI 67 vtype)
                ] UNSPEC_VPREDICATE)
            (reg/v:RVVM8SF 104 v8 [orig:143 _xx ] [143])
            (mem:RVVM8SF (reg/f:DI 18 s2 [orig:218 _77 ] [218]) [0  S[128, 128] A32])))
     (nil))

Looking at the log for the reload pass, it is found that "Changing pseudo 209 in
operand 3 of insn 69 on equiv 0x1".
It converts the vl operand in insn from the expected register(reg:DI 209) to the
constant 1(const_int 1 [0x1]).

This conversion occurs because, although the predicate for the vl operand is
restricted by "vector_length_operand" in the pattern, the constraint is still
"rK", which allows the transformation.

The issue is that changing the "rK" constraint to "rJ" for the constraint of vl
operand in the pattern would prevent this conversion, But unfortunately this will
conflict with RVV (RISC-V Vector Extension).

Based on the review's recommendations, the best solution for now is to create
a new constraint to distinguish between RVV and XTheadVector, which is exactly
what this patch does.

PR target/116593

gcc/ChangeLog:

* config/riscv/constraints.md (vl): New.
* config/riscv/thead-vector.md: Replacing rK with rvl.
* config/riscv/vector.md: Likewise.

gcc/testsuite/ChangeLog:

* g++.target/riscv/rvv/rvv.exp: Enable testsuite of XTheadVector.
* g++.target/riscv/rvv/xtheadvector/pr116593.C: New test.

gcc/config/riscv/constraints.md
gcc/config/riscv/thead-vector.md
gcc/config/riscv/vector.md
gcc/testsuite/g++.target/riscv/rvv/rvv.exp
gcc/testsuite/g++.target/riscv/rvv/xtheadvector/pr116593.C [new file with mode: 0644]

index f25975dc02083eed9df4f473e85bca6cef860402..ba3c6e6a4c44e017b22409a1fd8840dea468dd94 100644 (file)
   (and (match_code "const_vector")
        (match_test "riscv_vector::const_vec_all_same_in_range_p (op, 0, 31)")))
 
+(define_constraint "vl"
+  "A uimm5 for Vector or zero for XTheadVector."
+  (and (match_code "const_int")
+       (ior (match_test "!TARGET_XTHEADVECTOR && satisfies_constraint_K (op)")
+           (match_test "TARGET_XTHEADVECTOR && satisfies_constraint_J (op)"))))
+
 (define_constraint "Wc0"
   "@internal
  A constraint that matches a vector of immediate all zeros."
index 5fe9ba08c4eb3033c81cbd7608c6d00f5d10f839..5a02debdd207054750b411334cc107b058e2ea04 100644 (file)
   [(set (match_operand:V_VLS_VT 0 "reg_or_mem_operand"  "=vr,vr, m")
        (unspec:V_VLS_VT
          [(match_operand:V_VLS_VT 1 "reg_or_mem_operand" " vr, m,vr")
-          (match_operand 2 "vector_length_operand"   " rK, rK, rK")
+          (match_operand 2 "vector_length_operand"   "rvl,rvl,rvl")
           (match_operand 3 "const_1_operand"         "  i, i, i")
           (reg:SI VL_REGNUM)
           (reg:SI VTYPE_REGNUM)]
   [(set (match_operand:VB 0 "reg_or_mem_operand"  "=vr,vr, m")
        (unspec:VB
          [(match_operand:VB 1 "reg_or_mem_operand" " vr, m,vr")
-          (match_operand 2 "vector_length_operand"   " rK, rK, rK")
+          (match_operand 2 "vector_length_operand"   "rvl,rvl,rvl")
           (match_operand 3 "const_1_operand"         "  i, i, i")
           (reg:SI VL_REGNUM)
           (reg:SI VTYPE_REGNUM)]
        (if_then_else:VB_VLS
          (unspec:VB_VLS
            [(match_operand:VB_VLS 1 "vector_all_trues_mask_operand" "Wc1, Wc1, Wc1, Wc1, Wc1")
-            (match_operand 4 "vector_length_operand"            " rK,  rK,  rK,  rK,  rK")
+            (match_operand 4 "vector_length_operand"            "rvl, rvl, rvl, rvl, rvl")
             (match_operand 5 "const_int_operand"                "  i,   i,   i,   i,   i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
     (if_then_else:V_VLS
       (unspec:<VM>
        [(match_operand:<VM> 1 "vector_mask_operand"       "vmWc1,   Wc1,    vm, vmWc1,   Wc1,   Wc1")
-        (match_operand 4 "vector_length_operand"             "   rK,    rK,    rK,    rK,    rK,    rK")
+        (match_operand 4 "vector_length_operand"             "  rvl,   rvl,   rvl,   rvl,   rvl,   rvl")
         (match_operand 5 "const_int_operand"             "    i,     i,     i,     i,     i,     i")
         (match_operand 6 "const_int_operand"             "    i,     i,     i,     i,     i,     i")
         (match_operand 7 "const_int_operand"             "    i,     i,     i,     i,     i,     i")
        (if_then_else:VI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1")
-            (match_operand 3 "vector_length_operand"    "   rK")
+            (match_operand 3 "vector_length_operand"    "  rvl")
             (match_operand 4 "const_int_operand"       "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_TH_VSMEM_OP)
        (if_then_else:VI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,   Wc1,    vm")
-            (match_operand 5 "vector_length_operand"    "   rK,    rK,    rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,   rvl,   rvl")
             (match_operand 6 "const_int_operand"       "    i,     i,     i")
             (match_operand 7 "const_int_operand"       "    i,     i,     i")
             (match_operand 8 "const_int_operand"       "    i,     i,     i")
        (if_then_else:VI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"       "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_TH_VSSMEM_OP)
        (if_then_else:VI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1,vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK,rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i, i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i, i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i, i,  i")
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"       "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_TH_VSXMEM_OP)
index 243f3f76d28aeec8e3edc9f2c336426c2c22b79d..cf22b39d6cb37886f1699a1c0f5ae5cb19ab040b 100644 (file)
 
 (define_insn "@vsetvl<mode>"
   [(set (match_operand:P 0 "register_operand" "=r")
-       (unspec:P [(match_operand:P 1 "vector_length_operand" "rK")
+       (unspec:P [(match_operand:P 1 "vector_length_operand" "rvl")
                   (match_operand 2 "const_int_operand" "i")
                   (match_operand 3 "const_int_operand" "i")
                   (match_operand 4 "const_int_operand" "i")
 ;; in vsetvl instruction pattern.
 (define_insn "@vsetvl_discard_result<mode>"
   [(set (reg:SI VL_REGNUM)
-       (unspec:SI [(match_operand:P 0 "vector_length_operand" "rK")
+       (unspec:SI [(match_operand:P 0 "vector_length_operand" "rvl")
                    (match_operand 1 "const_int_operand" "i")
                    (match_operand 2 "const_int_operand" "i")] UNSPEC_VSETVL))
    (set (reg:SI VTYPE_REGNUM)
 ;; such pattern can allow us gain benefits of these optimizations.
 (define_insn_and_split "@vsetvl<mode>_no_side_effects"
   [(set (match_operand:P 0 "register_operand" "=r")
-       (unspec:P [(match_operand:P 1 "vector_length_operand" "rK")
+       (unspec:P [(match_operand:P 1 "vector_length_operand" "rvl")
                   (match_operand 2 "const_int_operand" "i")
                   (match_operand 3 "const_int_operand" "i")
                   (match_operand 4 "const_int_operand" "i")
     (if_then_else:V_VLS
       (unspec:<VM>
         [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,   Wc1,    vm, vmWc1,   Wc1,   Wc1")
-         (match_operand 4 "vector_length_operand"              "   rK,    rK,    rK,    rK,    rK,    rK")
+         (match_operand 4 "vector_length_operand"              "  rvl,   rvl,   rvl,   rvl,   rvl,   rvl")
          (match_operand 5 "const_int_operand"                  "    i,     i,     i,     i,     i,     i")
          (match_operand 6 "const_int_operand"                  "    i,     i,     i,     i,     i,     i")
          (match_operand 7 "const_int_operand"                  "    i,     i,     i,     i,     i,     i")
        (if_then_else:V
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1")
-            (match_operand 3 "vector_length_operand"    "   rK")
+            (match_operand 3 "vector_length_operand"    "  rvl")
             (match_operand 4 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VB_VLS
          (unspec:VB_VLS
            [(match_operand:VB_VLS 1 "vector_all_trues_mask_operand" "Wc1, Wc1, Wc1, Wc1, Wc1")
-            (match_operand 4 "vector_length_operand"            " rK,  rK,  rK,  rK,  rK")
+            (match_operand 4 "vector_length_operand"            "rvl, rvl, rvl, rvl, rvl")
             (match_operand 5 "const_int_operand"                "  i,   i,   i,   i,   i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VB
          (unspec:VB
            [(match_operand:VB 1 "vector_all_trues_mask_operand" "Wc1")
-            (match_operand 3 "vector_length_operand"            " rK")
+            (match_operand 3 "vector_length_operand"            "rvl")
             (match_operand 4 "const_int_operand"                "  i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
   [(set (match_operand:V_VLS 0 "register_operand"        "=vd,vd,vd,vd")
     (if_then_else:V_VLS
       (unspec:<VM>
-        [(match_operand 5 "vector_length_operand"    " rK,rK,rK,rK")
+        [(match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
          (match_operand 6 "const_int_operand"        "  i, i, i, i")
          (match_operand 7 "const_int_operand"        "  i, i, i, i")
          (reg:SI VL_REGNUM)
   [(set (match_operand:V_VLSI_QHS 0 "register_operand"   "=vd,vd")
     (if_then_else:V_VLSI_QHS
       (unspec:<VM>
-        [(match_operand 5 "vector_length_operand"    " rK,rK")
+        [(match_operand 5 "vector_length_operand"    "rvl,rvl")
          (match_operand 6 "const_int_operand"        "  i, i")
          (match_operand 7 "const_int_operand"        "  i, i")
          (reg:SI VL_REGNUM)
   [(set (match_operand:V_VLSI_D 0 "register_operand"     "=vd,vd")
     (if_then_else:V_VLSI_D
       (unspec:<VM>
-        [(match_operand 5 "vector_length_operand"    " rK,rK")
+        [(match_operand 5 "vector_length_operand"    "rvl,rvl")
          (match_operand 6 "const_int_operand"        "  i, i")
          (match_operand 7 "const_int_operand"        "  i, i")
          (reg:SI VL_REGNUM)
   [(set (match_operand:V_VLSI_D 0 "register_operand"         "=vd,vd")
     (if_then_else:V_VLSI_D
       (unspec:<VM>
-        [(match_operand 5 "vector_length_operand"        " rK,rK")
+        [(match_operand 5 "vector_length_operand"        "rvl,rvl")
          (match_operand 6 "const_int_operand"            "  i, i")
          (match_operand 7 "const_int_operand"            "  i, i")
          (reg:SI VL_REGNUM)
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_broadcast_mask_operand" "Wc1,Wc1, vm, vm,Wc1,Wc1,Wb1,Wb1")
-            (match_operand 4 "vector_length_operand"              " rK, rK, rK, rK, rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"              "rvl,rvl,rvl,rvl,rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"                  "  i,  i,  i,  i,  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"                  "  i,  i,  i,  i,  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"                  "  i,  i,  i,  i,  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_broadcast_mask_operand" "Wc1, Wc1, Wb1, Wb1")
-            (match_operand      4 "vector_length_operand"         " rK,  rK,  rK,  rK")
+            (match_operand      4 "vector_length_operand"         "rvl, rvl, rvl, rvl")
             (match_operand      5 "const_int_operand"             "  i,   i,   i,   i")
             (match_operand      6 "const_int_operand"             "  i,   i,   i,   i")
             (match_operand      7 "const_int_operand"             "  i,   i,   i,   i")
        (if_then_else:V_VLSF_ZVFHMIN
          (unspec:<VM>
            [(match_operand:<VM>        1 "vector_broadcast_mask_operand" " vm,  vm, Wc1, Wc1")
-            (match_operand             4 "vector_length_operand"         " rK,  rK,  rK,  rK")
+            (match_operand             4 "vector_length_operand"         "rvl, rvl, rvl, rvl")
             (match_operand             5 "const_int_operand"             "  i,   i,   i,   i")
             (match_operand             6 "const_int_operand"             "  i,   i,   i,   i")
             (match_operand             7 "const_int_operand"             "  i,   i,   i,   i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_broadcast_mask_operand" "Wc1,Wc1,Wb1,Wb1")
-            (match_operand 4 "vector_length_operand"              " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"              "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"                  "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"                  "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"                  "  i,  i,  i,  i")
     (if_then_else:V_VLS
       (unspec:<VM>
         [(match_operand:<VM> 1 "vector_least_significant_set_mask_operand" "Wb1,   Wb1")
-         (match_operand 4 "vector_length_operand"                          " rK,    rK")
+         (match_operand 4 "vector_length_operand"                          "rvl,   rvl")
          (match_operand 5 "const_int_operand"                              "  i,     i")
          (match_operand 6 "const_int_operand"                              "  i,     i")
          (match_operand 7 "const_int_operand"                              "  i,     i")
     (if_then_else:V_VLS
       (unspec:<VM>
         [(match_operand:<VM> 1 "vector_all_trues_mask_operand"      "  Wc1,   Wc1")
-         (match_operand 4 "vector_length_operand"                   "   rK,    rK")
+         (match_operand 4 "vector_length_operand"                   "  rvl,   rvl")
          (match_operand 5 "const_int_operand"                       "    i,     i")
          (match_operand 6 "const_int_operand"                       "    i,     i")
          (match_operand 7 "const_int_operand"                       "    i,     i")
        (if_then_else:V_VLS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,   Wc1,    vm,    vmWc1,   Wc1,    vm")
-            (match_operand 5 "vector_length_operand"    "   rK,    rK,    rK,       rK,    rK,    rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,   rvl,   rvl,      rvl,   rvl,   rvl")
             (match_operand 6 "const_int_operand"        "    i,     i,     i,        i,     i,     i")
             (match_operand 7 "const_int_operand"        "    i,     i,     i,        i,     i,     i")
             (match_operand 8 "const_int_operand"        "    i,     i,     i,        i,     i,     i")
          [(match_operand:V_VLS   0 "memory_operand"           "   +m,     m")
           (unspec:<VM>
            [(match_operand:<VM>  1 "vector_mask_operand"      "vmWc1, vmWc1")
-            (match_operand       4 "vector_length_operand"    "   rK,    rK")
+            (match_operand       4 "vector_length_operand"    "  rvl,   rvl")
             (match_operand       5 "const_int_operand"        "    i,     i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VINDEXED
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"    " vm,Wc1,vm,Wc1")
-            (match_operand 5 "vector_length_operand"       " rK, rK,rK, rK")
+            (match_operand 5 "vector_length_operand"       "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"           "  i,  i, i,  i")
             (match_operand 7 "const_int_operand"           "  i,  i, i,  i")
             (match_operand 8 "const_int_operand"           "  i,  i, i,  i")
        (if_then_else:VEEWEXT2
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                  "   rK,   rK")
+            (match_operand 5 "vector_length_operand"                  "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                      "    i,    i")
             (match_operand 7 "const_int_operand"                      "    i,    i")
             (match_operand 8 "const_int_operand"                      "    i,    i")
        (if_then_else:VEEWEXT4
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                  "   rK,   rK")
+            (match_operand 5 "vector_length_operand"                  "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                      "    i,    i")
             (match_operand 7 "const_int_operand"                      "    i,    i")
             (match_operand 8 "const_int_operand"                      "    i,    i")
        (if_then_else:VEEWEXT8
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                  "   rK,   rK")
+            (match_operand 5 "vector_length_operand"                  "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                      "    i,    i")
             (match_operand 7 "const_int_operand"                      "    i,    i")
             (match_operand 8 "const_int_operand"                      "    i,    i")
        (if_then_else:VEEWTRUNC2
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 5 "vector_length_operand"                "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 6 "const_int_operand"                    "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                    "  i,  i,  i,  i,    i,    i")
             (match_operand 8 "const_int_operand"                    "  i,  i,  i,  i,    i,    i")
        (if_then_else:VEEWTRUNC4
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
             (match_operand 8 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
        (if_then_else:VEEWTRUNC8
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"          " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"             " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 5 "vector_length_operand"             "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 6 "const_int_operand"                 "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                 "  i,  i,  i,  i,    i,    i")
             (match_operand 8 "const_int_operand"                 "  i,  i,  i,  i,    i,    i")
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1, Wc1, vm, vm,Wc1,Wc1, vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK,  rK, rK, rK, rK, rK, rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl, rvl,rvl,rvl,rvl,rvl,rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,   i,  i,  i,  i,  i,  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,   i,  i,  i,  i,  i,  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,   i,  i,  i,  i,  i,  i,  i,  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  "vm,vm,Wc1,Wc1,vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"     "rK,rK, rK, rK,rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl,rvl,rvl,rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"         " i, i,  i,  i, i, i,  i,  i")
             (match_operand 7 "const_int_operand"         " i, i,  i,  i, i, i,  i,  i")
             (match_operand 8 "const_int_operand"         " i, i,  i,  i, i, i,  i,  i")
        (if_then_else:V_VLSI_QHS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:V_VLSI_QHS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:V_VLSI_QHS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"        "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"            " i, i,  i,  i")
             (match_operand 7 "const_int_operand"            " i, i,  i,  i")
             (match_operand 8 "const_int_operand"            " i, i,  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"        "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"            " i, i,  i,  i")
             (match_operand 7 "const_int_operand"            " i, i,  i,  i")
             (match_operand 8 "const_int_operand"            " i, i,  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"        "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"            " i, i,  i,  i")
             (match_operand 7 "const_int_operand"            " i, i,  i,  i")
             (match_operand 8 "const_int_operand"            " i, i,  i,  i")
        (if_then_else:VFULLI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:VI_QHS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
             (match_operand 8 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:VFULLI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"   "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"      "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"      "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"          " i, i,  i,  i")
             (match_operand 7 "const_int_operand"          " i, i,  i,  i")
             (match_operand 8 "const_int_operand"          " i, i,  i,  i")
        (if_then_else:VFULLI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"         "rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"         "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"             " i, i,  i,  i")
             (match_operand 7 "const_int_operand"             " i, i,  i,  i")
             (match_operand 8 "const_int_operand"             " i, i,  i,  i")
   [(set (match_operand:VI 0 "register_operand"           "=vd,vd,vd,vd")
        (if_then_else:VI
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"     "rK,rK,rK,rK")
+           [(match_operand 5 "vector_length_operand"     "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"         " i, i, i, i")
             (match_operand 7 "const_int_operand"         " i, i, i, i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:VI 0 "register_operand"           "=vd,vd")
        (if_then_else:VI
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"     "rK,rK")
+           [(match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         " i, i")
             (match_operand 7 "const_int_operand"         " i, i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:VI_QHS 0 "register_operand"        "=vd,vd")
        (if_then_else:VI_QHS
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"      "rK,rK")
+           [(match_operand 5 "vector_length_operand"      "rvl,rvl")
             (match_operand 6 "const_int_operand"          " i, i")
             (match_operand 7 "const_int_operand"          " i, i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:VI_QHS 0 "register_operand"         "=vd,vd")
        (if_then_else:VI_QHS
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"       "rK,rK")
+           [(match_operand 5 "vector_length_operand"       "rvl,rvl")
             (match_operand 6 "const_int_operand"           " i, i")
             (match_operand 7 "const_int_operand"           " i, i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:VI_D 0 "register_operand"           "=vd,vd")
        (if_then_else:VI_D
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"       "rK,rK")
+           [(match_operand 5 "vector_length_operand"       "rvl,rvl")
             (match_operand 6 "const_int_operand"           " i, i")
             (match_operand 7 "const_int_operand"           " i, i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:VI_D 0 "register_operand"                "=vd,vd")
        (if_then_else:VI_D
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"            "rK,rK")
+           [(match_operand 5 "vector_length_operand"            "rvl,rvl")
             (match_operand 6 "const_int_operand"                " i, i")
             (match_operand 7 "const_int_operand"                " i, i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:VI_D 0 "register_operand"           "=vd,vd")
        (if_then_else:VI_D
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"       "rK,rK")
+           [(match_operand 5 "vector_length_operand"       "rvl,rvl")
             (match_operand 6 "const_int_operand"           " i, i")
             (match_operand 7 "const_int_operand"           " i, i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:VI_D 0 "register_operand"                "=vd,vd")
        (if_then_else:VI_D
          (unspec:<VM>
-           [(match_operand 5 "vector_length_operand"           "rK,rK")
+           [(match_operand 5 "vector_length_operand"           "rvl,rvl")
             (match_operand 6 "const_int_operand"               " i, i")
             (match_operand 7 "const_int_operand"               " i, i")
             (reg:SI VL_REGNUM)
             (match_operand:VI 2 "vector_arith_operand" "vrvi,  vr,  vi"))
            (match_operand:<VM> 3 "register_operand"    "  vm,  vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand" "  rK,  rK,  rK")
+             [(match_operand 4 "vector_length_operand" " rvl, rvl, rvl")
               (match_operand 5 "const_int_operand"     "   i,   i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMADC))]
             (match_operand:VI 2 "register_operand"     " vr,  0,  vr"))
            (match_operand:<VM> 3 "register_operand"    " vm, vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand" " rK, rK,  rK")
+             [(match_operand 4 "vector_length_operand" "rvl,rvl, rvl")
               (match_operand 5 "const_int_operand"     "  i,  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMSBC))]
             (match_operand:VI_QHS 1 "register_operand"  "  0,  vr"))
            (match_operand:<VM> 3 "register_operand"     " vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand"  " rK,  rK")
+             [(match_operand 4 "vector_length_operand"  "rvl, rvl")
               (match_operand 5 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMADC))]
             (match_operand:VI_QHS 1 "register_operand"  "  0,  vr"))
            (match_operand:<VM> 3 "register_operand"     " vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand"  " rK,  rK")
+             [(match_operand 4 "vector_length_operand"  "rvl, rvl")
               (match_operand 5 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMSBC))]
             (match_operand:VI_D 1 "register_operand"    "  0,  vr"))
            (match_operand:<VM> 3 "register_operand"     " vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand"  " rK,  rK")
+             [(match_operand 4 "vector_length_operand"  "rvl, rvl")
               (match_operand 5 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMADC))]
             (match_operand:VI_D 1 "register_operand"         "  0,  vr"))
            (match_operand:<VM> 3 "register_operand"          " vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand"       " rK,  rK")
+             [(match_operand 4 "vector_length_operand"       "rvl, rvl")
               (match_operand 5 "const_int_operand"           "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMADC))]
             (match_operand:VI_D 1 "register_operand"    "  0,  vr"))
            (match_operand:<VM> 3 "register_operand"     " vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand"  " rK,  rK")
+             [(match_operand 4 "vector_length_operand"  "rvl, rvl")
               (match_operand 5 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMSBC))]
             (match_operand:VI_D 1 "register_operand"         "  0,  vr"))
            (match_operand:<VM> 3 "register_operand"          " vm,  vm")
            (unspec:<VM>
-             [(match_operand 4 "vector_length_operand"       " rK,  rK")
+             [(match_operand 4 "vector_length_operand"       "rvl, rvl")
               (match_operand 5 "const_int_operand"           "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_VMSBC))]
             (match_operand:VI 1 "register_operand"     "  %0,  vr,  vr")
             (match_operand:VI 2 "vector_arith_operand" "vrvi,  vr,  vi"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand" "  rK,  rK,  rK")
+             [(match_operand 3 "vector_length_operand" " rvl, rvl, rvl")
               (match_operand 4 "const_int_operand"     "   i,   i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
             (match_operand:VI 1 "register_operand"     "   0,  vr,  vr,  vr")
             (match_operand:VI 2 "register_operand"     "  vr,   0,  vr,  vi"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand" "  rK,  rK,  rK,  rK")
+             [(match_operand 3 "vector_length_operand" " rvl, rvl, rvl, rvl")
               (match_operand 4 "const_int_operand"     "   i,   i,   i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
               (match_operand:<VEL> 2 "reg_or_0_operand" " rJ,  rJ"))
             (match_operand:VI_QHS 1 "register_operand"  "  0,  vr"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand"  " rK,  rK")
+             [(match_operand 3 "vector_length_operand"  "rvl, rvl")
               (match_operand 4 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
               (match_operand:<VEL> 2 "reg_or_0_operand" " rJ,  rJ"))
             (match_operand:VI_QHS 1 "register_operand"  "  0,  vr"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand"  " rK,  rK")
+             [(match_operand 3 "vector_length_operand"  "rvl, rvl")
               (match_operand 4 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
               (match_operand:<VEL> 2 "reg_or_0_operand" " rJ,  rJ"))
             (match_operand:VI_D 1 "register_operand"    "  0,  vr"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand"  " rK,  rK")
+             [(match_operand 3 "vector_length_operand"  "rvl, rvl")
               (match_operand 4 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
                 (match_operand:<VSUBEL> 2 "reg_or_0_operand" " rJ,  rJ")))
             (match_operand:VI_D 1 "register_operand"         "  0,  vr"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand"       " rK,  rK")
+             [(match_operand 3 "vector_length_operand"       "rvl, rvl")
               (match_operand 4 "const_int_operand"           "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
               (match_operand:<VEL> 2 "reg_or_0_operand" " rJ,  rJ"))
             (match_operand:VI_D 1 "register_operand"    "  0,  vr"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand"  " rK,  rK")
+             [(match_operand 3 "vector_length_operand"  "rvl, rvl")
               (match_operand 4 "const_int_operand"      "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
                 (match_operand:<VSUBEL> 2 "reg_or_0_operand" " rJ,  rJ")))
             (match_operand:VI_D 1 "register_operand"         "  0,  vr"))
            (unspec:<VM>
-             [(match_operand 3 "vector_length_operand"      " rK,  rK")
+             [(match_operand 3 "vector_length_operand"      "rvl, rvl")
               (match_operand 4 "const_int_operand"          "  i,   i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)] UNSPEC_OVERFLOW))]
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vm,vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"    "rK,rK, rK, rK")
+            (match_operand 4 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"        " i, i,  i,  i")
             (match_operand 6 "const_int_operand"        " i, i,  i,  i")
             (match_operand 7 "const_int_operand"        " i, i,  i,  i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"         "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"            "   rK,   rK")
+            (match_operand 4 "vector_length_operand"            "  rvl,  rvl")
             (match_operand 5 "const_int_operand"                "    i,    i")
             (match_operand 6 "const_int_operand"                "    i,    i")
             (match_operand 7 "const_int_operand"                "    i,    i")
        (if_then_else:VQEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"          "   rK,   rK")
+            (match_operand 4 "vector_length_operand"          "  rvl,  rvl")
             (match_operand 5 "const_int_operand"              "    i,    i")
             (match_operand 6 "const_int_operand"              "    i,    i")
             (match_operand 7 "const_int_operand"              "    i,    i")
        (if_then_else:VOEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"         "   rK,   rK")
+            (match_operand 4 "vector_length_operand"         "  rvl,  rvl")
             (match_operand 5 "const_int_operand"             "    i,    i")
             (match_operand 6 "const_int_operand"             "    i,    i")
             (match_operand 7 "const_int_operand"             "    i,    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           " vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"              " rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"              "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"                  "  i, i,  i,  i")
             (match_operand 7 "const_int_operand"                  "  i, i,  i,  i")
             (match_operand 8 "const_int_operand"                  "  i, i,  i,  i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           " vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"              " rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"              "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"                  "  i, i,  i,  i")
             (match_operand 7 "const_int_operand"                  "  i, i,  i,  i")
             (match_operand 8 "const_int_operand"                  "  i, i,  i,  i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           " vm,vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"              " rK,rK, rK, rK")
+            (match_operand 5 "vector_length_operand"              "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"                  "  i, i,  i,  i")
             (match_operand 7 "const_int_operand"                  "  i, i,  i,  i")
             (match_operand 8 "const_int_operand"                  "  i, i,  i,  i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"              "   rK,   rK")
+            (match_operand 4 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 5 "const_int_operand"                  "    i,    i")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
        (if_then_else:<V_DOUBLE_TRUNC>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               " vm,vm,Wc1,Wc1,vm,Wc1,vmWc1,vmWc1, vm,Wc1,vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                  " rK,rK, rK, rK,rK, rK,   rK,   rK, rK, rK,   rK,   rK")
+            (match_operand 5 "vector_length_operand"                  "rvl,rvl,rvl,rvl,rvl,rvl,  rvl,  rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 6 "const_int_operand"                      "  i, i,  i,  i, i,  i,    i,    i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                      "  i, i,  i,  i, i,  i,    i,    i,  i,  i,    i,    i")
             (match_operand 8 "const_int_operand"                      "  i, i,  i,  i, i,  i,    i,    i,  i,  i,    i,    i")
        (if_then_else:<V_DOUBLE_TRUNC>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                  " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 5 "vector_length_operand"                  "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 6 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
             (match_operand 8 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
        (if_then_else:<V_DOUBLE_TRUNC>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"                  " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 4 "vector_length_operand"                  "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 5 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
             (match_operand 6 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1, vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK, rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl,rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i,  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i,  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i,  i,  i,  i,  i")
        (if_then_else:VI_QHS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VI_QHS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"        " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"            "  i,  i,  i,  i")
        (if_then_else:VI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"        " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"            "  i,  i,  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VI_QHS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"   " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"      " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"      "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"          "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"          "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"          "  i,  i,  i,  i")
        (if_then_else:VI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"    " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"       " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"       "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"           "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"           "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"           "  i,  i,  i,  i")
        (if_then_else:<V_DOUBLE_TRUNC>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               " vm,vm,Wc1,Wc1,vm,Wc1,vmWc1,vmWc1, vm,Wc1,vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                  " rK,rK, rK, rK,rK, rK,   rK,   rK, rK, rK,   rK,   rK")
+            (match_operand 5 "vector_length_operand"                  "rvl,rvl,rvl,rvl,rvl,rvl,  rvl,  rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 6 "const_int_operand"                      "  i, i,  i,  i, i,  i,    i,    i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                      "  i, i,  i,  i, i,  i,    i,    i,  i,  i,    i,    i")
             (match_operand 8 "const_int_operand"                      "  i, i,  i,  i, i,  i,    i,    i,  i,  i,    i,    i")
        (if_then_else:<V_DOUBLE_TRUNC>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"                  " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 5 "vector_length_operand"                  "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 6 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
             (match_operand 8 "const_int_operand"                      "  i,  i,  i,  i,    i,    i")
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "register_operand"        "   0")
-            (match_operand 5 "vector_length_operand"        "  rK")
+            (match_operand 5 "vector_length_operand"        " rvl")
             (match_operand 6 "const_int_operand"            "   i")
             (match_operand 7 "const_int_operand"            "   i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "    0,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "register_operand"        "   0")
-            (match_operand 5 "vector_length_operand"        "  rK")
+            (match_operand 5 "vector_length_operand"        " rvl")
             (match_operand 6 "const_int_operand"            "   i")
             (match_operand 7 "const_int_operand"            "   i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "    0,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "register_operand"          "  0")
-            (match_operand 5 "vector_length_operand"          " rK")
+            (match_operand 5 "vector_length_operand"          "rvl")
             (match_operand 6 "const_int_operand"              "  i")
             (match_operand 7 "const_int_operand"              "  i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"   "    0,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"      "   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"      "  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"          "    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"          "    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "register_operand"           "  0")
-            (match_operand 5 "vector_length_operand"           " rK")
+            (match_operand 5 "vector_length_operand"           "rvl")
             (match_operand 6 "const_int_operand"               "  i")
             (match_operand 7 "const_int_operand"               "  i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"   "    0,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"      "   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"      "  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"          "    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"          "    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "register_operand"          "  0")
-            (match_operand 5 "vector_length_operand"          " rK")
+            (match_operand 5 "vector_length_operand"          "rvl")
             (match_operand 6 "const_int_operand"              "  i")
             (match_operand 7 "const_int_operand"              "  i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       "vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"          "   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"          "  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"              "    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"              "    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       "    0,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"          "   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"          "  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"              "    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"              "    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,  Wc1,Wc1")
-            (match_operand 6 "vector_length_operand"    " rK, rK,   rK, rK")
+            (match_operand 6 "vector_length_operand"    "rvl,rvl,  rvl,rvl")
             (match_operand 7 "const_int_operand"        "  i,  i,    i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,    i,  i")
             (match_operand 9 "const_int_operand"        "  i,  i,    i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         "  i,  i")
             (match_operand 7 "const_int_operand"         "  i,  i")
             (match_operand 8 "const_int_operand"         "  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         "  i,  i")
             (match_operand 7 "const_int_operand"         "  i,  i")
             (match_operand 8 "const_int_operand"         "  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       " vm,Wc1")
-            (match_operand 5 "vector_length_operand"          " rK, rK")
+            (match_operand 5 "vector_length_operand"          "rvl,rvl")
             (match_operand 6 "const_int_operand"              "  i,  i")
             (match_operand 7 "const_int_operand"              "  i,  i")
             (match_operand 8 "const_int_operand"              "  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       " vm,Wc1")
-            (match_operand 5 "vector_length_operand"          " rK, rK")
+            (match_operand 5 "vector_length_operand"          "rvl,rvl")
             (match_operand 6 "const_int_operand"              "  i,  i")
             (match_operand 7 "const_int_operand"              "  i,  i")
             (match_operand 8 "const_int_operand"              "  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 6 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 6 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 9 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         "  i,  i")
             (match_operand 7 "const_int_operand"         "  i,  i")
             (match_operand 8 "const_int_operand"         "  i,  i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         "  i,  i")
             (match_operand 7 "const_int_operand"         "  i,  i")
             (match_operand 8 "const_int_operand"         "  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       " vm,Wc1")
-            (match_operand 5 "vector_length_operand"          " rK, rK")
+            (match_operand 5 "vector_length_operand"          "rvl,rvl")
             (match_operand 6 "const_int_operand"              "  i,  i")
             (match_operand 7 "const_int_operand"              "  i,  i")
             (match_operand 8 "const_int_operand"              "  i,  i")
        (if_then_else:V_VLSI_D
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       " vm,Wc1")
-            (match_operand 5 "vector_length_operand"          " rK, rK")
+            (match_operand 5 "vector_length_operand"          "rvl,rvl")
             (match_operand 6 "const_int_operand"              "  i,  i")
             (match_operand 7 "const_int_operand"              "  i,  i")
             (match_operand 8 "const_int_operand"              "  i,  i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             "vmWc1")
-            (match_operand 5 "vector_length_operand"                "   rK")
+            (match_operand 5 "vector_length_operand"                "  rvl")
             (match_operand 6 "const_int_operand"                    "    i")
             (match_operand 7 "const_int_operand"                    "    i")
             (match_operand 8 "const_int_operand"                    "    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             "vmWc1")
-            (match_operand 5 "vector_length_operand"                "   rK")
+            (match_operand 5 "vector_length_operand"                "  rvl")
             (match_operand 6 "const_int_operand"                    "    i")
             (match_operand 7 "const_int_operand"                    "    i")
             (match_operand 8 "const_int_operand"                    "    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             "vmWc1")
-            (match_operand 5 "vector_length_operand"                "   rK")
+            (match_operand 5 "vector_length_operand"                "  rvl")
             (match_operand 6 "const_int_operand"                    "    i")
             (match_operand 7 "const_int_operand"                    "    i")
             (match_operand 8 "const_int_operand"                    "    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             "vmWc1")
-            (match_operand 5 "vector_length_operand"                "   rK")
+            (match_operand 5 "vector_length_operand"                "  rvl")
             (match_operand 6 "const_int_operand"                    "    i")
             (match_operand 7 "const_int_operand"                    "    i")
             (match_operand 8 "const_int_operand"                    "    i")
        (if_then_else:VWEXTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             "vmWc1")
-            (match_operand 5 "vector_length_operand"                "   rK")
+            (match_operand 5 "vector_length_operand"                "  rvl")
             (match_operand 6 "const_int_operand"                    "    i")
             (match_operand 7 "const_int_operand"                    "    i")
             (match_operand 8 "const_int_operand"                    "    i")
        (if_then_else:VB_VLS
          (unspec:VB_VLS
            [(match_operand:VB_VLS 1 "vector_all_trues_mask_operand" "Wc1")
-            (match_operand 5 "vector_length_operand"            " rK")
+            (match_operand 5 "vector_length_operand"            "rvl")
             (match_operand 6 "const_int_operand"                "  i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VB_VLS
          (unspec:VB_VLS
            [(match_operand:VB_VLS 1 "vector_all_trues_mask_operand" "Wc1")
-            (match_operand 5 "vector_length_operand"            " rK")
+            (match_operand 5 "vector_length_operand"            "rvl")
             (match_operand 6 "const_int_operand"                "  i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VB_VLS
          (unspec:VB_VLS
            [(match_operand:VB_VLS 1 "vector_all_trues_mask_operand" "Wc1")
-            (match_operand 5 "vector_length_operand"            " rK")
+            (match_operand 5 "vector_length_operand"            "rvl")
             (match_operand 6 "const_int_operand"                "  i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VB_VLS
          (unspec:VB_VLS
            [(match_operand:VB_VLS 1 "vector_all_trues_mask_operand" "Wc1")
-            (match_operand 4 "vector_length_operand"            " rK")
+            (match_operand 4 "vector_length_operand"            "rvl")
             (match_operand 5 "const_int_operand"                "  i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
            [(and:VB_VLS
               (match_operand:VB_VLS 1 "vector_mask_operand" "vmWc1")
               (match_operand:VB_VLS 2 "register_operand"    "   vr"))
-            (match_operand 3 "vector_length_operand"        "   rK")
+            (match_operand 3 "vector_length_operand"        "  rvl")
             (match_operand 4 "const_int_operand"            "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)))]
              [(and:VB
                 (match_operand:VB 1 "vector_mask_operand" "vmWc1")
                 (match_operand:VB 2 "register_operand"    "   vr"))
-              (match_operand 3 "vector_length_operand"    "   rK")
+              (match_operand 3 "vector_length_operand"    "  rvl")
               (match_operand 4 "const_int_operand"        "    i")
               (reg:SI VL_REGNUM)
               (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE))
        (if_then_else:VB
          (unspec:VB
            [(match_operand:VB 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"  "   rK,   rK")
+            (match_operand 4 "vector_length_operand"  "  rvl,  rvl")
             (match_operand 5 "const_int_operand"      "    i,    i")
             (match_operand 6 "const_int_operand"      "    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:VI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK,   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl,  rvl")
             (match_operand 5 "const_int_operand"        "    i,    i")
             (match_operand 6 "const_int_operand"        "    i,    i")
             (match_operand 7 "const_int_operand"        "    i,    i")
        (if_then_else:V_VLSI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 3 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 3 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 4 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 5 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,vm,Wc1,Wc1")
-            (match_operand 6 "vector_length_operand"    " rK,rK, rK, rK")
+            (match_operand 6 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 7 "const_int_operand"        "  i, i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i, i,  i,  i")
             (match_operand 9 "const_int_operand"        "  i, i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         "  i,  i")
             (match_operand 7 "const_int_operand"         "  i,  i")
             (match_operand 8 "const_int_operand"         "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         "  i,  i")
             (match_operand 7 "const_int_operand"         "  i,  i")
             (match_operand 8 "const_int_operand"         "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,vm,Wc1,Wc1")
-            (match_operand 6 "vector_length_operand"    " rK,rK, rK, rK")
+            (match_operand 6 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 7 "const_int_operand"        "  i, i,  i,  i")
             (match_operand 8 "const_int_operand"        "  i, i,  i,  i")
             (match_operand 9 "const_int_operand"        "  i, i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm,Wc1")
-            (match_operand 5 "vector_length_operand"    " rK, rK")
+            (match_operand 5 "vector_length_operand"    "rvl,rvl")
             (match_operand 6 "const_int_operand"        "  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i")
             (match_operand 8 "const_int_operand"        "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  " vm,Wc1")
-            (match_operand 5 "vector_length_operand"     " rK, rK")
+            (match_operand 5 "vector_length_operand"     "rvl,rvl")
             (match_operand 6 "const_int_operand"         "  i,  i")
             (match_operand 7 "const_int_operand"         "  i,  i")
             (match_operand 8 "const_int_operand"         "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"    " vm,Wc1")
-            (match_operand 5 "vector_length_operand"       " rK, rK")
+            (match_operand 5 "vector_length_operand"       "rvl,rvl")
             (match_operand 6 "const_int_operand"           "  i,  i")
             (match_operand 7 "const_int_operand"           "  i,  i")
             (match_operand 8 "const_int_operand"           "  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:VF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"    " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"    "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:<VCONVERT>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"        " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"            "  i,  i,  i,  i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"              "   rK,   rK")
+            (match_operand 5 "vector_length_operand"              "  rvl,  rvl")
             (match_operand 6 "const_int_operand"                  "    i,    i")
             (match_operand 7 "const_int_operand"                  "    i,    i")
             (match_operand 8 "const_int_operand"                  "    i,    i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"          " vm, vm,Wc1,Wc1")
-            (match_operand 5 "vector_length_operand"             " rK, rK, rK, rK")
+            (match_operand 5 "vector_length_operand"             "rvl,rvl,rvl,rvl")
             (match_operand 6 "const_int_operand"                 "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"                 "  i,  i,  i,  i")
             (match_operand 8 "const_int_operand"                 "  i,  i,  i,  i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             "vmWc1")
-            (match_operand 5 "vector_length_operand"                "   rK")
+            (match_operand 5 "vector_length_operand"                "  rvl")
             (match_operand 6 "const_int_operand"                    "    i")
             (match_operand 7 "const_int_operand"                    "    i")
             (match_operand 8 "const_int_operand"                    "    i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"             "vmWc1")
-            (match_operand 5 "vector_length_operand"                "   rK")
+            (match_operand 5 "vector_length_operand"                "  rvl")
             (match_operand 6 "const_int_operand"                    "    i")
             (match_operand 7 "const_int_operand"                    "    i")
             (match_operand 8 "const_int_operand"                    "    i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               "vmWc1")
-            (match_operand 5 "vector_length_operand"                  "   rK")
+            (match_operand 5 "vector_length_operand"                  "  rvl")
             (match_operand 6 "const_int_operand"                      "    i")
             (match_operand 7 "const_int_operand"                      "    i")
             (match_operand 8 "const_int_operand"                      "    i")
        (if_then_else:VWEXTF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"               "vmWc1")
-            (match_operand 5 "vector_length_operand"                  "   rK")
+            (match_operand 5 "vector_length_operand"                  "  rvl")
             (match_operand 6 "const_int_operand"                      "    i")
             (match_operand 7 "const_int_operand"                      "    i")
             (match_operand 8 "const_int_operand"                      "    i")
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "register_operand"          "  0")
-            (match_operand 5 "vector_length_operand"          " rK")
+            (match_operand 5 "vector_length_operand"          "rvl")
             (match_operand 6 "const_int_operand"              "  i")
             (match_operand 7 "const_int_operand"              "  i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "    0,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i,    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "register_operand"         "  0")
-            (match_operand 5 "vector_length_operand"         " rK")
+            (match_operand 5 "vector_length_operand"         "rvl")
             (match_operand 6 "const_int_operand"             "  i")
             (match_operand 7 "const_int_operand"             "  i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
        (if_then_else:<VM>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "    0,vmWc1,vmWc1,vmWc1,vmWc1")
-            (match_operand 6 "vector_length_operand"         "   rK,   rK,   rK,   rK,   rK")
+            (match_operand 6 "vector_length_operand"         "  rvl,  rvl,  rvl,  rvl,  rvl")
             (match_operand 7 "const_int_operand"             "    i,    i,    i,    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i,    i,    i,    i")
             (reg:SI VL_REGNUM)
   [(set (match_operand:V_VLSF 0 "register_operand"      "=vd,vd")
     (if_then_else:V_VLSF
       (unspec:<VM>
-        [(match_operand 5 "vector_length_operand"   " rK,rK")
+        [(match_operand 5 "vector_length_operand"   "rvl,rvl")
          (match_operand 6 "const_int_operand"       "  i, i")
          (match_operand 7 "const_int_operand"       "  i, i")
          (reg:SI VL_REGNUM)
        (if_then_else:<VCONVERT>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"        " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"            "  i,  i,  i,  i")
        (if_then_else:<VCONVERT>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"        " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"        "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"            "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"            "  i,  i,  i,  i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"    " vm, vm,Wc1,Wc1")
-            (match_operand 4 "vector_length_operand"       " rK, rK, rK, rK")
+            (match_operand 4 "vector_length_operand"       "rvl,rvl,rvl,rvl")
             (match_operand 5 "const_int_operand"           "  i,  i,  i,  i")
             (match_operand 6 "const_int_operand"           "  i,  i,  i,  i")
             (match_operand 7 "const_int_operand"           "  i,  i,  i,  i")
        (if_then_else:VWCONVERTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"         "   rK,   rK")
+            (match_operand 4 "vector_length_operand"         "  rvl,  rvl")
             (match_operand 5 "const_int_operand"             "    i,    i")
             (match_operand 6 "const_int_operand"             "    i,    i")
             (match_operand 7 "const_int_operand"             "    i,    i")
        (if_then_else:VWCONVERTI
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"        "   rK,   rK")
+            (match_operand 4 "vector_length_operand"        "  rvl,  rvl")
             (match_operand 5 "const_int_operand"            "    i,    i")
             (match_operand 6 "const_int_operand"            "    i,    i")
             (match_operand 7 "const_int_operand"            "    i,    i")
        (if_then_else:V_VLSF
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"     "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"        "   rK,   rK")
+            (match_operand 4 "vector_length_operand"        "  rvl,  rvl")
             (match_operand 5 "const_int_operand"            "    i,    i")
             (match_operand 6 "const_int_operand"            "    i,    i")
             (match_operand 7 "const_int_operand"            "    i,    i")
        (if_then_else:VWEXTF_ZVFHMIN
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"          "vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"             "   rK,   rK")
+            (match_operand 4 "vector_length_operand"             "  rvl,  rvl")
             (match_operand 5 "const_int_operand"                 "    i,    i")
             (match_operand 6 "const_int_operand"                 "    i,    i")
             (match_operand 7 "const_int_operand"                 "    i,    i")
        (if_then_else:<VNCONVERT>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"       " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"          " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 4 "vector_length_operand"          "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 5 "const_int_operand"              "  i,  i,  i,  i,    i,    i")
             (match_operand 6 "const_int_operand"              "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"              "  i,  i,  i,  i,    i,    i")
        (if_then_else:<VNCONVERT>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"         " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 4 "vector_length_operand"         "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 5 "const_int_operand"             "  i,  i,  i,  i,    i,    i")
             (match_operand 6 "const_int_operand"             "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"             "  i,  i,  i,  i,    i,    i")
        (if_then_else:<VNCONVERT>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"         " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 4 "vector_length_operand"         "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 5 "const_int_operand"             "  i,  i,  i,  i,    i,    i")
             (match_operand 6 "const_int_operand"             "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"             "  i,  i,  i,  i,    i,    i")
        (if_then_else:<V_DOUBLE_TRUNC>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"              " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 4 "vector_length_operand"              "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 5 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
             (match_operand 6 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
        (if_then_else:<V_DOUBLE_TRUNC>
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"           " vm, vm,Wc1,Wc1,vmWc1,vmWc1")
-            (match_operand 4 "vector_length_operand"              " rK, rK, rK, rK,   rK,   rK")
+            (match_operand 4 "vector_length_operand"              "rvl,rvl,rvl,rvl,  rvl,  rvl")
             (match_operand 5 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
             (match_operand 6 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
             (match_operand 7 "const_int_operand"                  "  i,  i,  i,  i,    i,    i")
        (unspec:<V_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>          1 "vector_mask_operand"   "vmWc1,vmWc1")
-            (match_operand               5 "vector_length_operand" "   rK,   rK")
+            (match_operand               5 "vector_length_operand" "  rvl,  rvl")
             (match_operand               6 "const_int_operand"     "    i,    i")
             (match_operand               7 "const_int_operand"     "    i,    i")
             (reg:SI VL_REGNUM)
        (unspec:<V_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>          1 "vector_mask_operand"   "vmWc1")
-            (match_operand               5 "vector_length_operand" "   rK")
+            (match_operand               5 "vector_length_operand" "  rvl")
             (match_operand               6 "const_int_operand"     "    i")
             (match_operand               7 "const_int_operand"     "    i")
             (reg:SI VL_REGNUM)
        (unspec:<V_EXT_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>           1 "vector_mask_operand"   "vmWc1,vmWc1")
-            (match_operand                5 "vector_length_operand" "   rK,   rK")
+            (match_operand                5 "vector_length_operand" "  rvl,  rvl")
             (match_operand                6 "const_int_operand"     "    i,    i")
             (match_operand                7 "const_int_operand"     "    i,    i")
             (reg:SI VL_REGNUM)
        (unspec:<V_EXT_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>           1 "vector_mask_operand"   "vmWc1")
-            (match_operand                5 "vector_length_operand" "   rK")
+            (match_operand                5 "vector_length_operand" "  rvl")
             (match_operand                6 "const_int_operand"     "    i")
             (match_operand                7 "const_int_operand"     "    i")
             (reg:SI VL_REGNUM)
        (unspec:<V_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>          1 "vector_mask_operand"   "vmWc1,vmWc1")
-            (match_operand               5 "vector_length_operand" "   rK,   rK")
+            (match_operand               5 "vector_length_operand" "  rvl,  rvl")
             (match_operand               6 "const_int_operand"     "    i,    i")
             (match_operand               7 "const_int_operand"     "    i,    i")
             (reg:SI VL_REGNUM)
        (unspec:<V_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>          1 "vector_mask_operand"   "vmWc1")
-            (match_operand               5 "vector_length_operand" "   rK")
+            (match_operand               5 "vector_length_operand" "  rvl")
             (match_operand               6 "const_int_operand"     "    i")
             (match_operand               7 "const_int_operand"     "    i")
             (reg:SI VL_REGNUM)
        (unspec:<V_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>          1 "vector_mask_operand"   "vmWc1,vmWc1")
-            (match_operand               5 "vector_length_operand" "   rK,   rK")
+            (match_operand               5 "vector_length_operand" "  rvl,  rvl")
             (match_operand               6 "const_int_operand"     "    i,    i")
             (match_operand               7 "const_int_operand"     "    i,    i")
             (match_operand               8 "const_int_operand"     "    i,    i")
        (unspec:<V_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>          1 "vector_mask_operand"   "vmWc1")
-            (match_operand               5 "vector_length_operand" "   rK")
+            (match_operand               5 "vector_length_operand" "  rvl")
             (match_operand               6 "const_int_operand"     "    i")
             (match_operand               7 "const_int_operand"     "    i")
             (match_operand               8 "const_int_operand"     "    i")
        (unspec:<V_EXT_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>           1 "vector_mask_operand"   "vmWc1,vmWc1")
-            (match_operand                5 "vector_length_operand" "   rK,   rK")
+            (match_operand                5 "vector_length_operand" "  rvl,  rvl")
             (match_operand                6 "const_int_operand"     "    i,    i")
             (match_operand                7 "const_int_operand"     "    i,    i")
             (match_operand                8 "const_int_operand"     "    i,    i")
        (unspec:<V_EXT_LMUL1>
          [(unspec:<VM>
            [(match_operand:<VM>           1 "vector_mask_operand"   "vmWc1")
-            (match_operand                5 "vector_length_operand" "   rK")
+            (match_operand                5 "vector_length_operand" "  rvl")
             (match_operand                6 "const_int_operand"     "    i")
             (match_operand                7 "const_int_operand"     "    i")
             (match_operand                8 "const_int_operand"     "    i")
        (unspec:V_VLS
          [(unspec:<VM>
             [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-             (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+             (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
              (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (unspec:V_VLSI_QHS
          [(unspec:<VM>
             [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-             (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+             (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
              (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (unspec:V_VLSI_D
          [(unspec:<VM>
             [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-             (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+             (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
              (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (unspec:V_VLSI_D
          [(unspec:<VM>
             [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-             (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+             (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
              (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (unspec:V_VLSF
          [(unspec:<VM>
             [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm,Wc1,Wc1")
-             (match_operand 5 "vector_length_operand"    " rK, rK, rK, rK")
+             (match_operand 5 "vector_length_operand"    "rvl,rvl,rvl,rvl")
              (match_operand 6 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 7 "const_int_operand"        "  i,  i,  i,  i")
              (match_operand 8 "const_int_operand"        "  i,  i,  i,  i")
        (if_then_else:V_VLS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"  "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"     "   rK,   rK")
+            (match_operand 5 "vector_length_operand"     "  rvl,  rvl")
             (match_operand 6 "const_int_operand"         "    i,    i")
             (match_operand 7 "const_int_operand"         "    i,    i")
             (match_operand 8 "const_int_operand"         "    i,    i")
        (if_then_else:V_VLS
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"   "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"      "   rK,   rK")
+            (match_operand 5 "vector_length_operand"      "  rvl,  rvl")
             (match_operand 6 "const_int_operand"          "    i,    i")
             (match_operand 7 "const_int_operand"          "    i,    i")
             (match_operand 8 "const_int_operand"          "    i,    i")
        (if_then_else:VEI16
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand"      "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"         "   rK,   rK")
+            (match_operand 5 "vector_length_operand"         "  rvl,  rvl")
             (match_operand 6 "const_int_operand"             "    i,    i")
             (match_operand 7 "const_int_operand"             "    i,    i")
             (match_operand 8 "const_int_operand"             "    i,    i")
        (unspec:V_VLS
          [(unspec:<VM>
            [(match_operand:<VM> 3 "register_operand"    "  vm,  vm")
-            (match_operand 4 "vector_length_operand"    "  rK,  rK")
+            (match_operand 4 "vector_length_operand"    " rvl, rvl")
             (match_operand 5 "const_int_operand"        "   i,   i")
             (match_operand 6 "const_int_operand"        "   i,   i")
             (reg:SI VL_REGNUM)
        (if_then_else:V
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "   vm,    vm,   Wc1,   Wc1")
-            (match_operand 4 "vector_length_operand"    "   rK,    rK,    rK,    rK")
+            (match_operand 4 "vector_length_operand"    "  rvl,   rvl,   rvl,   rvl")
             (match_operand 5 "const_int_operand"        "    i,     i,     i,     i")
             (match_operand 6 "const_int_operand"        "    i,     i,     i,     i")
             (match_operand 7 "const_int_operand"        "    i,     i,     i,     i")
        (if_then_else:VT
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,   Wc1,    vm")
-            (match_operand 4 "vector_length_operand"    "   rK,    rK,    rK")
+            (match_operand 4 "vector_length_operand"    "  rvl,   rvl,   rvl")
             (match_operand 5 "const_int_operand"        "    i,     i,     i")
             (match_operand 6 "const_int_operand"        "    i,     i,     i")
             (match_operand 7 "const_int_operand"        "    i,     i,     i")
        (unspec:BLK
          [(unspec:<VM>
             [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-             (match_operand 3 "vector_length_operand"    "   rK")
+             (match_operand 3 "vector_length_operand"    "  rvl")
              (match_operand 4 "const_int_operand"        "    i")
              (reg:SI VL_REGNUM)
              (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VT
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,   Wc1,    vm")
-            (match_operand 5 "vector_length_operand"    "   rK,    rK,    rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,   rvl,   rvl")
             (match_operand 6 "const_int_operand"        "    i,     i,     i")
             (match_operand 7 "const_int_operand"        "    i,     i,     i")
             (match_operand 8 "const_int_operand"        "    i,     i,     i")
        (unspec:BLK
          [(unspec:<VM>
             [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-             (match_operand 4 "vector_length_operand"    "   rK")
+             (match_operand 4 "vector_length_operand"    "  rvl")
              (match_operand 5 "const_int_operand"        "    i")
              (reg:SI VL_REGNUM)
              (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (if_then_else:VT
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,   Wc1,    vm")
-            (match_operand 4 "vector_length_operand"    "   rK,    rK,    rK")
+            (match_operand 4 "vector_length_operand"    "  rvl,   rvl,   rvl")
             (match_operand 5 "const_int_operand"        "    i,     i,     i")
             (match_operand 6 "const_int_operand"        "    i,     i,     i")
             (match_operand 7 "const_int_operand"        "    i,     i,     i")
        (if_then_else:V1T
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"    "   rK,   rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,  rvl")
             (match_operand 6 "const_int_operand"        "    i,    i")
             (match_operand 7 "const_int_operand"        "    i,    i")
             (match_operand 8 "const_int_operand"        "    i,    i")
        (if_then_else:V2T
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"    "   rK,   rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,  rvl")
             (match_operand 6 "const_int_operand"        "    i,    i")
             (match_operand 7 "const_int_operand"        "    i,    i")
             (match_operand 8 "const_int_operand"        "    i,    i")
        (if_then_else:V4T
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"    "   rK,   rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,  rvl")
             (match_operand 6 "const_int_operand"        "    i,    i")
             (match_operand 7 "const_int_operand"        "    i,    i")
             (match_operand 8 "const_int_operand"        "    i,    i")
        (if_then_else:V8T
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"    "   rK,   rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,  rvl")
             (match_operand 6 "const_int_operand"        "    i,    i")
             (match_operand 7 "const_int_operand"        "    i,    i")
             (match_operand 8 "const_int_operand"        "    i,    i")
        (if_then_else:V16T
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"    "   rK,   rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,  rvl")
             (match_operand 6 "const_int_operand"        "    i,    i")
             (match_operand 7 "const_int_operand"        "    i,    i")
             (match_operand 8 "const_int_operand"        "    i,    i")
        (if_then_else:V32T
          (unspec:<VM>
            [(match_operand:<VM> 1 "vector_mask_operand" "vmWc1,vmWc1")
-            (match_operand 5 "vector_length_operand"    "   rK,   rK")
+            (match_operand 5 "vector_length_operand"    "  rvl,  rvl")
             (match_operand 6 "const_int_operand"        "    i,    i")
             (match_operand 7 "const_int_operand"        "    i,    i")
             (match_operand 8 "const_int_operand"        "    i,    i")
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
        (unspec:BLK
          [(unspec:<VM>
            [(match_operand:<VM> 0 "vector_mask_operand" "vmWc1")
-            (match_operand 4 "vector_length_operand"    "   rK")
+            (match_operand 4 "vector_length_operand"    "  rvl")
             (match_operand 5 "const_int_operand"        "    i")
             (reg:SI VL_REGNUM)
             (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE)
index e587c3e14404f97ff11e5c573b14547b4a339b2e..1bd73cdbeed00e3c365f165656576ba5c98bb5c7 100644 (file)
@@ -45,5 +45,8 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/base/*.C]] \
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/autovec/*.\[C\]]] \
         "" $CFLAGS
 
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/xtheadvector/*.C]] \
+       "" $CFLAGS
+
 # All done.
 dg-finish
diff --git a/gcc/testsuite/g++.target/riscv/rvv/xtheadvector/pr116593.C b/gcc/testsuite/g++.target/riscv/rvv/xtheadvector/pr116593.C
new file mode 100644 (file)
index 0000000..cef5bec
--- /dev/null
@@ -0,0 +1,47 @@
+/* Test that we do not have ice when compile */
+/* { dg-do compile } */
+/* { dg-options "-march=rv32gc_zfh_xtheadvector -mabi=ilp32d -O2" { target { rv32 } } } */
+/* { dg-options "-march=rv64gc_zfh_xtheadvector -mabi=lp64d -O2" { target { rv64 } } } */
+
+#include <math.h>
+#include <riscv_vector.h>
+#include <vector>
+
+static
+vfloat32m8_t atan2_ps (vfloat32m8_t a, vfloat32m8_t b, size_t vl)
+{
+  std::vector<float> tmpx (vl);
+  std::vector<float> tmpy (vl);
+  __riscv_vse32_v_f32m8 (tmpx.data (), a, vl);
+  __riscv_vse32_v_f32m8 (tmpy.data (), b, vl);
+  for (size_t i = 0; i < vl; i++)
+  {
+    tmpx[i] = atan2 (tmpx[i], tmpy[i]);
+  }
+  return __riscv_vle32_v_f32m8 (tmpx.data (), vl);
+}
+
+void
+atan2 (const float *x, const float *y, float *out, int size, int ch)
+{
+  for (int i = 0; i < ch; i++)
+  {
+    const float *xx = x + size * i;
+    const float *yy = y + size * i;
+    float *zz = out + size * i;
+
+    int n = size;
+    while (n > 0)
+    {
+      size_t vl = __riscv_vsetvl_e32m8 (n);
+      vfloat32m8_t _xx = __riscv_vle32_v_f32m8 (xx, vl);
+      vfloat32m8_t _yy = __riscv_vle32_v_f32m8 (yy, vl);
+      vfloat32m8_t _zz = atan2_ps (_xx, _yy, vl);
+      __riscv_vse32_v_f32m8 (zz, _zz, vl);
+      n -= vl;
+      xx += vl;
+      yy += vl;
+      zz += vl;
+    }
+  }
+}