forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vect: Don't pass subtype to vect_widened_op_tree where not needed [PR…
… 110142] This patch fixes an issue introduced by g:2f482a07365d9f4a94a56edd13b7f01b8f78b5a0, where a subtype was beeing passed to vect_widened_op_tree, when no subtype was to be used. This lead to an errorneous use of IFN_VEC_WIDEN_MINUS. gcc/ChangeLog: PR middle-end/110142 * tree-vect-patterns.cc (vect_recog_widen_op_pattern): Don't pass subtype to vect_widened_op_tree and remove subtype parameter, also remove superfluous overloaded function definition. (vect_recog_widen_plus_pattern): Remove subtype parameter and dont pass to call to vect_recog_widen_op_pattern. (vect_recog_widen_minus_pattern): Likewise. gcc/testsuite/ChangeLog: * gcc.dg/vect/pr110142.c: New test.
- Loading branch information
1 parent
e52be60
commit 3ad0ef3
Showing
2 changed files
with
13 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-additional-options "-O3" } */ | ||
void test(short *x, unsigned short *y, int n) | ||
{ | ||
for (int i = 0; i < n; i++) | ||
x[i] = (y[i] - x[i]) >> 1; | ||
} | ||
|
||
/* { dg-final { scan-tree-dump-not "widen_minus" "vect" } } */ |
This file contains 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