tree-vect-transform.c (vect_create_epilog_for_reduction): Set BIT_FIELD_REF_UNSIGNED for newly created BIT_FIELD_REFs.
* tree-vect-transform.c (vect_create_epilog_for_reduction): Set BIT_FIELD_REF_UNSIGNED for newly created BIT_FIELD_REFs. From-SVN: r102913
This commit is contained in:
parent
323dff9a7c
commit
0ed414a4f6
4 changed files with 28 additions and 11 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-08-09 Dorit Nuzman <dorit@il.ibm.com>
|
||||
|
||||
* tree-vect-transform.c (vect_create_epilog_for_reduction): Set
|
||||
BIT_FIELD_REF_UNSIGNED for newly created BIT_FIELD_REFs.
|
||||
|
||||
2005-08-09 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* c-common.c (builtin_function_2): Remove.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2005-08-09 Dorit Nuzman <dorit@il.ibm.com>
|
||||
|
||||
* gcc.dg/vect/vect-reduc-1char.c: Reverse last change - change
|
||||
input data back to what it was originally.
|
||||
|
||||
2005-08-09 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
* objc.dg/try-catch-8.m: Enable for all targets.
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
#include "tree-vect.h"
|
||||
|
||||
#define N 16
|
||||
#define DIFF 122
|
||||
#define DIFF 242
|
||||
|
||||
void
|
||||
main1 (unsigned char x, unsigned char max_result, unsigned char min_result)
|
||||
{
|
||||
int i;
|
||||
unsigned char ub[N] = {1,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30};
|
||||
unsigned char ub[N] = {1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
|
||||
unsigned char uc[N] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
|
||||
unsigned char udiff = 2;
|
||||
unsigned char umax = x;
|
||||
|
|
|
@ -1021,9 +1021,12 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op,
|
|||
&& (integer_zerop (scalar_initial_def)
|
||||
|| real_zerop (scalar_initial_def)))
|
||||
{
|
||||
epilog_stmt = build2 (MODIFY_EXPR, scalar_type, new_scalar_dest,
|
||||
build3 (BIT_FIELD_REF, scalar_type,
|
||||
vec_temp, bitsize, bitsize_zero_node));
|
||||
tree rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
|
||||
bitsize_zero_node);
|
||||
|
||||
BIT_FIELD_REF_UNSIGNED (rhs) = TYPE_UNSIGNED (scalar_type);
|
||||
epilog_stmt = build2 (MODIFY_EXPR, scalar_type, new_scalar_dest,
|
||||
rhs);
|
||||
new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
|
||||
TREE_OPERAND (epilog_stmt, 0) = new_temp;
|
||||
bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
|
||||
|
@ -1043,10 +1046,12 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op,
|
|||
bit_offset += element_bitsize)
|
||||
{
|
||||
tree bitpos = bitsize_int (bit_offset);
|
||||
|
||||
tree rhs = build3 (BIT_FIELD_REF, scalar_type, vec_temp, bitsize,
|
||||
bitpos);
|
||||
|
||||
BIT_FIELD_REF_UNSIGNED (rhs) = TYPE_UNSIGNED (scalar_type);
|
||||
epilog_stmt = build2 (MODIFY_EXPR, scalar_type, new_scalar_dest,
|
||||
build3 (BIT_FIELD_REF, scalar_type,
|
||||
vec_temp, bitsize, bitpos));
|
||||
rhs);
|
||||
new_name = make_ssa_name (new_scalar_dest, epilog_stmt);
|
||||
TREE_OPERAND (epilog_stmt, 0) = new_name;
|
||||
bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
|
||||
|
@ -1074,6 +1079,8 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op,
|
|||
|
||||
if (extract_scalar_result)
|
||||
{
|
||||
tree rhs;
|
||||
|
||||
if (vect_print_dump_info (REPORT_DETAILS))
|
||||
fprintf (vect_dump, "extract scalar result");
|
||||
|
||||
|
@ -1085,9 +1092,9 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op,
|
|||
else
|
||||
bitpos = bitsize_zero_node;
|
||||
|
||||
epilog_stmt = build2 (MODIFY_EXPR, scalar_type, new_scalar_dest,
|
||||
build3 (BIT_FIELD_REF, scalar_type,
|
||||
new_temp, bitsize, bitpos));
|
||||
rhs = build3 (BIT_FIELD_REF, scalar_type, new_temp, bitsize, bitpos);
|
||||
BIT_FIELD_REF_UNSIGNED (rhs) = TYPE_UNSIGNED (scalar_type);
|
||||
epilog_stmt = build2 (MODIFY_EXPR, scalar_type, new_scalar_dest, rhs);
|
||||
new_temp = make_ssa_name (new_scalar_dest, epilog_stmt);
|
||||
TREE_OPERAND (epilog_stmt, 0) = new_temp;
|
||||
bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT);
|
||||
|
|
Loading…
Add table
Reference in a new issue