re PR c/69272 (ICE: in c_builtin_function, at c/c-decl.c:4020 with -fgnu-tm)

PR c/69272
PR tree-opt/68964

  * trans-mem.c (tm_log_emit_stmt): Fix unit size to bit size.
  * tree.c (build_tm_vector_builtins): Use builtin_decl_explicit_p
  instead of builtin_decl_declared_p to test for declaration.

From-SVN: r232390
This commit is contained in:
Richard Henderson 2016-01-14 13:36:12 -08:00 committed by Richard Henderson
parent 4318655262
commit 47c147b03f
3 changed files with 14 additions and 6 deletions

View File

@ -1,3 +1,11 @@
2016-01-14 Richard Henderson <rth@redhat.com>
PR c/69272
PR tree-opt/68964
* trans-mem.c (tm_log_emit_stmt): Fix unit size to bit size.
* tree.c (build_tm_vector_builtins): Use builtin_decl_explicit_p
instead of builtin_decl_declared_p to test for declaration.
2016-01-14 Nicklas Bo Jensen <nbjensen@gmail.com> 2016-01-14 Nicklas Bo Jensen <nbjensen@gmail.com>
* doc/loop.texi (Loop Analysis and Representation): Document * doc/loop.texi (Loop Analysis and Representation): Document

View File

@ -1229,16 +1229,16 @@ tm_log_emit_stmt (tree addr, gimple *stmt)
unhandled_vec: unhandled_vec:
switch (type_size) switch (type_size)
{ {
case 1: case 8:
code = BUILT_IN_TM_LOG_1; code = BUILT_IN_TM_LOG_1;
break; break;
case 2: case 16:
code = BUILT_IN_TM_LOG_2; code = BUILT_IN_TM_LOG_2;
break; break;
case 4: case 32:
code = BUILT_IN_TM_LOG_4; code = BUILT_IN_TM_LOG_4;
break; break;
case 8: case 64:
code = BUILT_IN_TM_LOG_8; code = BUILT_IN_TM_LOG_8;
break; break;
} }

View File

@ -10393,7 +10393,7 @@ build_tm_vector_builtins (void)
/* By default, 64 bit vectors go through the long long helpers. */ /* By default, 64 bit vectors go through the long long helpers. */
/* If a 128-bit vector is supported, declare those builtins. */ /* If a 128-bit vector is supported, declare those builtins. */
if (!builtin_decl_declared_p (BUILT_IN_TM_STORE_M128) if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M128)
&& ((vtype = find_tm_vector_type (128, SImode)) && ((vtype = find_tm_vector_type (128, SImode))
|| (vtype = find_tm_vector_type (128, SFmode)))) || (vtype = find_tm_vector_type (128, SFmode))))
{ {
@ -10430,7 +10430,7 @@ build_tm_vector_builtins (void)
} }
/* If a 256-bit vector is supported, declare those builtins. */ /* If a 256-bit vector is supported, declare those builtins. */
if (!builtin_decl_declared_p (BUILT_IN_TM_STORE_M256) if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M256)
&& ((vtype = find_tm_vector_type (256, SImode)) && ((vtype = find_tm_vector_type (256, SImode))
|| (vtype = find_tm_vector_type (256, SFmode)))) || (vtype = find_tm_vector_type (256, SFmode))))
{ {