Commit 2d4e0a12 by Aaron Sawdey Committed by Aaron Sawdey

re PR target/83660 (ICE with vec_extract inside expression statement)

2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>

	PR target/83660
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
	vec_extract expression as having side effects to make sure it gets
	a cleanup point.

2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>

	PR target/83660
	* gcc.target/powerpc/pr83660.C: New test.

From-SVN: r259403
parent af7a5758
2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/83660
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
vec_extract expression as having side effects to make sure it gets
a cleanup point.
2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
PR target/85403
......@@ -20,7 +27,7 @@
PROCESSOR_SKYLAKE-AVX512.
* gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
(processor_type): Add PROCESSOR_SKYLAKE.
2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
Jason Merrill <jason@redhat.com>
......
......@@ -6705,6 +6705,15 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
stmt = build_binary_op (loc, PLUS_EXPR, stmt, arg2, 1);
stmt = build_indirect_ref (loc, stmt, RO_NULL);
/* PR83660: We mark this as having side effects so that
downstream in fold_build_cleanup_point_expr () it will get a
CLEANUP_POINT_EXPR. If it does not we can run into an ICE
later in gimplify_cleanup_point_expr (). Potentially this
causes missed optimization because the actually is no side
effect. */
if (c_dialect_cxx ())
TREE_SIDE_EFFECTS (stmt) = 1;
return stmt;
}
......
2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/83660
* gcc.target/powerpc/pr83660.C: New test.
2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
PR target/85403
......
/* PR target/83660 */
/* { dg-do compile } */
/* { dg-options "-mcpu=power7" } */
/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */
#include <altivec.h>
typedef __vector unsigned int uvec32_t __attribute__((__aligned__(16)));
unsigned get_word(uvec32_t v)
{
return ({const unsigned _B1 = 32;
vec_extract((uvec32_t)v, 2);});
}
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