diff options
Diffstat (limited to 'gcc/tree-loop-distribution.c')
-rw-r--r-- | gcc/tree-loop-distribution.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c index 52db3c9..29825cc 100644 --- a/gcc/tree-loop-distribution.c +++ b/gcc/tree-loop-distribution.c @@ -944,13 +944,16 @@ const_with_all_bytes_same (tree val) return 0; break; case VECTOR_CST: - unsigned int j; - for (j = 0; j < VECTOR_CST_NELTS (val); ++j) - if (const_with_all_bytes_same (VECTOR_CST_ELT (val, j))) - break; - if (j == VECTOR_CST_NELTS (val)) - return 0; - break; + { + unsigned int count = vector_cst_encoded_nelts (val); + unsigned int j; + for (j = 0; j < count; ++j) + if (const_with_all_bytes_same (VECTOR_CST_ENCODED_ELT (val, j))) + break; + if (j == count) + return 0; + break; + } default: break; } |