From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C08263858D32; Wed, 15 Nov 2023 04:41:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C08263858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700023277; bh=HH4o0zhjE9BpyrNik9c4rVx36ZMWB62XwipobH5ta0Y=; h=From:To:Subject:Date:From; b=W+MHO4vXUaNjuDj0/c2mdUNuWINr8i4xbk2gJxFB4TgRNJg8HfucAGapDkxfkOBrf FSYVVqISdH3b3lGyo3V1/7Y3Nrb34PQyQQZcIt0G1Pb/HH/X4uDTLVNyMb/lhi1AGU DiErd6q2pe5v7hcaydCYRHdmz5wIoX18zll98Pvc= From: "mumuxi_ll at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112538] New: [RISC-V] Failed to disable V-ext autovectorization using the '--param riscv-autovec-preference=none' Date: Wed, 15 Nov 2023 04:41:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mumuxi_ll at outlook dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112538 Bug ID: 112538 Summary: [RISC-V] Failed to disable V-ext autovectorization using the '--param riscv-autovec-preference=3Dnone' Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mumuxi_ll at outlook dot com Target Milestone: --- Here is my test case: ``` #include typedef char Str_30 [31]; Str_30 Str_2_Loc; void foo(void) { strcpy(Str_2_Loc, "DHRYSTONE PROGRAM"); } ``` Compiled with riscv64-unknown-elf-gcc -march=3Drv32imafdc_zve32f -mabi=3Dil= p32d -S rvv_autovec_bug.c --param riscv-autovec-preference=3Dnone The result is: .string "DHRYSTONE PROGRAM" .text .align 1 .globl foo .type foo, @function foo: addi sp,sp,-16 sw ra,12(sp) sw s0,8(sp) addi s0,sp,16 lui a5,%hi(Str_2_Loc) addi a3,a5,%lo(Str_2_Loc) lui a5,%hi(.LC0) addi a4,a5,%lo(.LC0) mv a5,a3 vsetivli zero,9,e16,m8,ta,ma vle16.v v8,0(a4) vsetivli zero,9,e16,m8,ta,ma vse16.v v8,0(a5) nop lw ra,12(sp) lw s0,8(sp) addi sp,sp,16 jr ra It still generates the v-ext instructions automatically, which seems that t= he "--param riscv-autovec-preference=3Dnone" did not work.=