This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Turns out that when you create a BIT_FIELD_REF (using standrad build3) the
BIT_FIELD_REF_UNSIGNED field does not get set. As a result, later on in
fold-const.c:optimize_bit_field_compare() we end up thinking that we're
dealing with a signed char field rather than an unsigned char field, and
issue a warning "comparison is always 1 due to width of bit-field". To fix
this I explicitly set the BIT_FIELD_REF_UNSIGNED when I create these
BIT_FIELD_REFs in the vectorizer. Is there an API that I could have used
that sets the unsigned bit for BIT_FIELD_REFs? (if not - do we want to
introduce one - "build_bit_field_ref()", or is this fix ok?.
This patch also reverses the change I made to vect-reduc-1char.c in
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01889.html.
Bootstrapped with vectorization enabled on powerpc-darwin, tested on the
vectorizer testcases.
thanks,
dorit
:ADDPATCH SSA (vectorizer):
Changelog:
* tree-vect-transform.c (vect_create_epilog_for_reduction):
Set BIT_FIELD_REF_UNSIGNED for newly created BIT_FIELD_REFs.
testsuite/Chnagelog:
* gcc.dg/vect/vect-reduc-1char.c: Reverse last change - change
input data back to what it was originally.
Patch:
(See attached file: aug7)Attachment:
aug7
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |