Commit 2a2b8f64 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/69820 (Test miscompiled with -O3 option)

	PR tree-optimization/69820
	* tree-vect-patterns.c (type_conversion_p): Return false if
	*orig_type is unsigned single precision or boolean.
	(vect_recog_dot_prod_pattern, vect_recog_widen_mult_pattern):
	Formatting fix.

	* gcc.dg/vect/pr69820.c: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r233457
parent 5aa7d94c
2016-02-16 Jakub Jelinek <jakub@redhat.com> 2016-02-16 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR tree-optimization/69820
* tree-vect-patterns.c (type_conversion_p): Return false if
*orig_type is unsigned single precision or boolean.
(vect_recog_dot_prod_pattern, vect_recog_widen_mult_pattern):
Formatting fix.
2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/69764 PR rtl-optimization/69764
PR rtl-optimization/69771 PR rtl-optimization/69771
......
2016-02-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/69820
* gcc.dg/vect/pr69820.c: New test.
2016-02-16 Richard Biener <rguenther@suse.de> 2016-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/69776 PR tree-optimization/69776
......
/* PR tree-optimization/69820 */
#include "tree-vect.h"
unsigned int a[100];
long long int b[100];
unsigned short c[100];
__attribute__((noinline, noclone)) void
foo (void)
{
int i;
for (i = 0; i < 100; ++i)
b[i] = a[i] * (c[i] * (_Bool) c[i]);
}
int
main ()
{
int i;
if (__SIZEOF_INT__ * __CHAR_BIT__ != 32)
return 0;
check_vect ();
for (i = 0; i < 100; ++i)
{
a[i] = 3489456818U;
b[i] = 0x1eadbeefbeefdeadLL;
c[i] = 38364;
}
foo ();
for (i = 0; i < 100; ++i)
if (b[i] != 0xed446af8U)
__builtin_abort ();
return 0;
}
...@@ -171,6 +171,13 @@ type_conversion_p (tree name, gimple *use_stmt, bool check_sign, ...@@ -171,6 +171,13 @@ type_conversion_p (tree name, gimple *use_stmt, bool check_sign,
if (!*def_stmt) if (!*def_stmt)
return false; return false;
if (dt == vect_internal_def)
{
stmt_vec_info def_vinfo = vinfo_for_stmt (*def_stmt);
if (STMT_VINFO_IN_PATTERN_P (def_vinfo))
return false;
}
if (!is_gimple_assign (*def_stmt)) if (!is_gimple_assign (*def_stmt))
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment