Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed typo #57

wants to merge 1 commit into from

Conversation

Pilot-Pirx
Copy link
Contributor

No description provided.

Copy link

@ozhanghe ozhanghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@marxin
Copy link
Contributor

marxin commented Dec 16, 2021

Applied as 06cd44b.

hubot pushed a commit that referenced this pull request May 7, 2024
vsetvli local eliminate is only consider the current demand instead of
full demand, and it will use that incomplete info to remove vsetvli.

Give following example from PR114747:

vsetvli a5,a1,e8,m4,ta,mu       # 57, ratio=2, sew=8, lmul=4
vsetvli zero,a5,e16,m8,ta,ma    # 58, ratio=2, sew=16, lmul=8
vle8.v  v8,0(a0)        # 13, demand ratio=2
vzext.vf2       v24,v8  # 14, demand sew=16 and lmul=8

Insn #58 will removed because #57 has satisfied demand of #13, but it's
not consider #14.

It should doing more demand analyze, but this bug only present in GCC 13
branch, and we should not change too much on this release branch, so the best
way is make the check more conservative - remove only if the target
vsetvl_discard_result having same SEW and LMUL as the source vsetvli.

gcc/ChangeLog:

	PR target/114747
	* config/riscv/riscv-vsetvl.cc (local_eliminate_vsetvl_insn):
	Check target vsetvl_discard_result and source vsetvli has same
	SEW and LMUL.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/vsetvl/pr114747.c: New.
Frosty515 pushed a commit to WorldOS-dev/gcc that referenced this pull request May 23, 2024
vsetvli local eliminate is only consider the current demand instead of
full demand, and it will use that incomplete info to remove vsetvli.

Give following example from PR114747:

vsetvli a5,a1,e8,m4,ta,mu       # 57, ratio=2, sew=8, lmul=4
vsetvli zero,a5,e16,m8,ta,ma    # 58, ratio=2, sew=16, lmul=8
vle8.v  v8,0(a0)        # 13, demand ratio=2
vzext.vf2       v24,v8  # 14, demand sew=16 and lmul=8

Insn gcc-mirror#58 will removed because gcc-mirror#57 has satisfied demand of gcc-mirror#13, but it's
not consider gcc-mirror#14.

It should doing more demand analyze, but this bug only present in GCC 13
branch, and we should not change too much on this release branch, so the best
way is make the check more conservative - remove only if the target
vsetvl_discard_result having same SEW and LMUL as the source vsetvli.

gcc/ChangeLog:

	PR target/114747
	* config/riscv/riscv-vsetvl.cc (local_eliminate_vsetvl_insn):
	Check target vsetvl_discard_result and source vsetvli has same
	SEW and LMUL.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/vsetvl/pr114747.c: New.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants