RISC-V: Do not use vsetivli for THeadVector.#9
Open
pz9115 wants to merge 1 commit into
Open
Conversation
Hi, in emit_vlmax_insn_lra we use a vsetivli for an immediate AVL. XTHeadVector does not support this, so guard appropriately. Regtested on rv64gcv_zvl512b. Regards Robin PR target/120461 gcc/ChangeLog: * config/riscv/riscv-v.cc (emit_vlmax_insn_lra): Do not emit vsetivli for XTHeadVector. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/xtheadvector/pr120461.c: New test.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the RISC-V vector code generator to avoid emitting vsetivli for XTHeadVector targets when computing VLMAX in post-RA, and adds a regression test to ensure compilation succeeds for xt-c920 with specific RVV and register-zeroing options. Flow diagram for emit_vlmax_insn_lra vsetivli emission guardflowchart TD
A[emit_vlmax_insn_lra] --> B["Check imm_avl_p(mode)"]
B -->|false| E[Skip vsetivli emission]
B -->|true| C[Check TARGET_XTHEADVECTOR]
C -->|true| E
C -->|false| D[Emit vsetivli for immediate AVL]
D --> F[Continue with VLMAX handling]
E --> F
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in emit_vlmax_insn_lra we use a vsetivli for an immediate AVL. XTHeadVector does not support this, so guard appropriately.
Regtested on rv64gcv_zvl512b.
Regards
Robin
gcc/ChangeLog:
gcc/testsuite/ChangeLog:
Thanks for taking the time to contribute to GCC! Please be advised that if you are
viewing this on
github.com, that the mirror there is unofficial and unmonitored.The GCC community does not use
github.comfor their contributions. Instead, we usea mailing list (
gcc-patches@gcc.gnu.org) for code submissions, code reviews, andbug reports. Please send patches there instead.
Summary by Sourcery
Guard use of immediate-AVL vsetivli in RISC-V VL-max emission so it is not used for XTHeadVector targets and add a regression test for the reported issue.
Bug Fixes:
Tests: