在 2025/3/13 上午10:36, Andrew Pinski 写道:
On Wed, Mar 12, 2025 at 6:23 PM Lulu Cheng <chengl...@loongson.cn> wrote:

在 2025/3/12 下午9:14, Xi Ruoyao 写道:
Structured binding is a C++17 feature but the GCC code base is in C++14.
I couldn't find the description of the standards followed by GCC code in
the document yesterday.

Therefore, I assumed that this standard is the same as the default
standard set during GCC compilation.

Is this described in the documentation?
yes it is described right here:
https://gcc.gnu.org/install/prerequisites.html

```
ISO C++14 compiler

Necessary to bootstrap GCC. GCC 5.4 or newer has sufficient support
for used C++14 features.

Versions of GCC prior to 15 allow bootstrapping with an ISO C++11
compiler, versions prior to 10.5 allow bootstrapping with an ISO C++98
compiler, and versions prior to 4.8 allow bootstrapping with an ISO
C89 compiler.

If you need to build an intermediate version of GCC in order to
bootstrap current GCC, consider GCC 9.5: it can build the current Ada
and D compilers, and was also the version that declared C++17 support
stable.
```

Notice it says C++ 2014.

Thanks,
Andrew

Oh, I see it.

Thank you very much.

gcc/ChangeLog:

       PR target/119238
       * config/loongarch/simd.md (<su>dot_prod<wvec_half><mode>):
       Stop using structured binding.
---

Ok for trunk?
Ok,thanks!


   gcc/config/loongarch/simd.md | 14 ++++++++------
   1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gcc/config/loongarch/simd.md b/gcc/config/loongarch/simd.md
index 8f7e912982e..dd17cd13fc5 100644
--- a/gcc/config/loongarch/simd.md
+++ b/gcc/config/loongarch/simd.md
@@ -809,18 +809,20 @@ (define_expand "<su>dot_prod<wvec_half><mode>"
      (any_extend (const_int 0))]
     ""
   {
-  auto [op0, op1, op2, op3] = operands;
+  rtx *op = operands;

-  if (op3 == CONST0_RTX (<WVEC_HALF>mode))
+  if (op[3] == CONST0_RTX (<WVEC_HALF>mode))
       emit_insn (
-      gen_<simd_isa>_<x>vmulwev_<simdfmt_w>_<simdfmt><u> (op0, op1, op2));
+      gen_<simd_isa>_<x>vmulwev_<simdfmt_w>_<simdfmt><u> (op[0], op[1],
+                                                       op[2]));
     else
       emit_insn (
-      gen_<simd_isa>_<x>vmaddwev_<simdfmt_w>_<simdfmt><u> (op0, op3, op1,
-                                                        op2));
+      gen_<simd_isa>_<x>vmaddwev_<simdfmt_w>_<simdfmt><u> (op[0], op[3],
+                                                        op[1], op[2]));

     emit_insn (
-    gen_<simd_isa>_<x>vmaddwod_<simdfmt_w>_<simdfmt><u> (op0, op0, op1, op2));
+    gen_<simd_isa>_<x>vmaddwod_<simdfmt_w>_<simdfmt><u> (op[0], op[0],
+                                                      op[1], op[2]));
     DONE;
   })


Reply via email to