loop-interchange.c

Line Hotness Pass Source Function / Inlining Chain
1
/* { dg-do run } */
2
/* { dg-options "-O2 -floop-interchange -fassociative-math -fno-signed-zeros -fno-trapping-math -fdump-tree-linterchange-details" } */
3
/* { dg-skip-if "too big data segment" { avr-*-* visium-*-* } } */
4
5
/* Copied from graphite/interchange-4.c */
6
7
#define DEBUG 0
8
#if DEBUG
9
#include <stdio.h>
10
#endif
11
12
double u[1782225];
13
14
static int __attribute__((noinline))
15
foo (int N, int *res)
16
{
17
  int i, j;
18
  double sum = 0;
19
  for (i = 0; i < N; i++)
0.01 linterchange
  ^=== tree_loop_interchange::interchange ===
    Loop_pair<outer:2, inner:3> is interchanged
    loops interchanged in loop nest
  
  • foo.constprop
0.01 vect

                        
^=== analyzing loop === Analyzing loop at loop-interchange.c:19 === analyze_loop_nest === === vect_analyze_loop_form === === vect_analyze_loop_form === === get_loop_niters === Considering outer-loop vectorization. === get_loop_niters === === vect_analyze_data_refs === analyze in outer loop: *(&u + (sizetype) (j_17 * 1335) * 8) outer base_address: &u outer offset from base address: 0 outer constant offset from base address: 0 outer step: 10680 outer base alignment: 16 outer base misalignment: 0 outer offset alignment: 128 outer step alignment: 8 got vectype for stmt: _5 = u[_4];vector(2) double === vect_analyze_scalar_cycles === Analyze phi: sum_42 = PHI <0.0(2), sum_37(10)> Access function of PHI: sum_42 Analyze phi: j_17 = PHI <0(2), j_10(10)> Access function of PHI: {0, +, 1}_2 step: 1, init: 0 Detected induction. Analyze phi: ivtmp_6 = PHI <1335(2), ivtmp_3(10)> Access function of PHI: {1335, +, 4294967295}_2 step: 4294967295, init: 1335 Detected induction. Analyze phi: ivtmp_1 = PHI <1335(2), ivtmp_44(10)> Access function of PHI: {1335, +, 4294967295}_2 step: 4294967295, init: 1335 Detected induction. Analyze phi: sum_42 = PHI <0.0(2), sum_37(10)> detected double reduction: sum_37 = PHI <sum_7(3)> Detected double reduction. === vect_analyze_scalar_cycles === Analyze phi: sum_40 = PHI <sum_42(5), sum_7(11)> Access function of PHI: {sum_42, +, _5}_3 step: _5, init: sum_42 step unknown. Analyze phi: i_26 = PHI <0(5), i_25(11)> Access function of PHI: {0, +, 1}_3 step: 1, init: 0 Detected induction. Analyze phi: ivtmp_24 = PHI <1335(5), ivtmp_19(11)> Access function of PHI: {1335, +, 4294967295}_3 step: 4294967295, init: 1335 Detected induction. Analyze phi: ivtmp_45 = PHI <1335(5), ivtmp_46(11)> Access function of PHI: {1335, +, 4294967295}_3 step: 4294967295, init: 1335 Detected induction. Analyze phi: sum_40 = PHI <sum_42(5), sum_7(11)> detected reduction: sum_7 = _5 + sum_40; Detected vectorizable nested cycle. === vect_pattern_recog === vect_is_simple_use: operand j_17 def_stmt: j_17 = PHI <0(2), j_10(10)> type of def: induction === vect_analyze_data_ref_accesses === grouped access in outer loop. not vectorized: complicated access pattern. bad data access.
  • foo.constprop
20
    for (j = 0; j < N; j++)
6.96 ldist
    ^Loop 3 not distributed.
    
  • foo.constprop
6.96 vect

                        
^=== analyzing loop === Analyzing loop at loop-interchange.c:20 === analyze_loop_nest === === vect_analyze_loop_form === === get_loop_niters === === vect_analyze_data_refs === got vectype for stmt: _5 = u[_4];vector(2) double === vect_analyze_scalar_cycles === Analyze phi: sum_40 = PHI <sum_42(5), sum_7(11)> Access function of PHI: {sum_42, +, _5}_3 step: _5, init: sum_42 step unknown. Analyze phi: i_26 = PHI <0(5), i_25(11)> Access function of PHI: {0, +, 1}_3 step: 1, init: 0 Detected induction. Analyze phi: ivtmp_24 = PHI <1335(5), ivtmp_19(11)> Access function of PHI: {1335, +, 4294967295}_3 step: 4294967295, init: 1335 Detected induction. Analyze phi: ivtmp_45 = PHI <1335(5), ivtmp_46(11)> Access function of PHI: {1335, +, 4294967295}_3 step: 4294967295, init: 1335 Detected induction. Analyze phi: sum_40 = PHI <sum_42(5), sum_7(11)> detected reduction: sum_7 = _5 + sum_40; Detected reduction. === vect_pattern_recog === vect_is_simple_use: operand j_17 def_stmt: j_17 = PHI <0(2), j_10(10)> type of def: external vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal === vect_analyze_data_ref_accesses === === vect_mark_stmts_to_be_vectorized === init: phi relevant? sum_40 = PHI <sum_42(5), sum_7(11)> init: phi relevant? i_26 = PHI <0(5), i_25(11)> init: phi relevant? ivtmp_24 = PHI <1335(5), ivtmp_19(11)> init: phi relevant? ivtmp_45 = PHI <1335(5), ivtmp_46(11)> init: stmt relevant? # DEBUG sum => NULL init: stmt relevant? # DEBUG i => i_26 init: stmt relevant? # DEBUG sum => NULL init: stmt relevant? # DEBUG j => 0 init: stmt relevant? # DEBUG sum => sum_40 init: stmt relevant? # DEBUG j => j_17 init: stmt relevant? # DEBUG BEGIN_STMT init: stmt relevant? _2 = j_17 * 1335; init: stmt relevant? _4 = _2 + i_26; init: stmt relevant? _5 = u[_4]; init: stmt relevant? sum_7 = _5 + sum_40; vec_stmt_relevant_p: used out of loop. vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal vec_stmt_relevant_p: stmt live but not relevant. mark relevant 1, live 1: sum_7 = _5 + sum_40; init: stmt relevant? # DEBUG sum => sum_7 init: stmt relevant? # DEBUG D#2 => j_17 + 1 init: stmt relevant? # DEBUG j => D#2 init: stmt relevant? # DEBUG sum => sum_7 init: stmt relevant? # DEBUG j => D#2 init: stmt relevant? # DEBUG i => NULL init: stmt relevant? # DEBUG sum => NULL init: stmt relevant? # DEBUG i => NULL init: stmt relevant? ivtmp_19 = ivtmp_24 - 1; init: stmt relevant? i_25 = i_26 + 1; init: stmt relevant? ivtmp_46 = ivtmp_45 - 1; init: stmt relevant? if (ivtmp_46 != 0) worklist: examine stmt: sum_7 = _5 + sum_40; vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal mark relevant 1, live 0: _5 = u[_4]; vect_is_simple_use: operand sum_40 def_stmt: sum_40 = PHI <sum_42(5), sum_7(11)> type of def: reduction mark relevant 1, live 0: sum_40 = PHI <sum_42(5), sum_7(11)> worklist: examine stmt: sum_40 = PHI <sum_42(5), sum_7(11)> vect_is_simple_use: operand sum_42 def_stmt: sum_42 = PHI <0.0(2), sum_37(10)> type of def: external def_stmt is out of loop. vect_is_simple_use: operand sum_7 def_stmt: sum_7 = _5 + sum_40; type of def: reduction reduc-stmt defining reduc-phi in the same nest. worklist: examine stmt: _5 = u[_4]; === vect_analyze_data_ref_dependences === === vect_determine_vectorization_factor === ==> examining phi: sum_40 = PHI <sum_42(5), sum_7(11)> get vectype for scalar type: double vectype: vector(2) double nunits = 2 ==> examining phi: i_26 = PHI <0(5), i_25(11)> ==> examining phi: ivtmp_24 = PHI <1335(5), ivtmp_19(11)> ==> examining phi: ivtmp_45 = PHI <1335(5), ivtmp_46(11)> ==> examining statement: # DEBUG sum => NULL skip. ==> examining statement: # DEBUG i => i_26 skip. ==> examining statement: # DEBUG sum => NULL skip. ==> examining statement: # DEBUG j => 0 skip. ==> examining statement: # DEBUG sum => sum_40 skip. ==> examining statement: # DEBUG j => j_17 skip. ==> examining statement: # DEBUG BEGIN_STMT skip. ==> examining statement: _2 = j_17 * 1335; skip. ==> examining statement: _4 = _2 + i_26; skip. ==> examining statement: _5 = u[_4]; get vectype for scalar type: double vectype: vector(2) double nunits = 2 ==> examining statement: sum_7 = _5 + sum_40; get vectype for scalar type: double vectype: vector(2) double get vectype for scalar type: double vectype: vector(2) double nunits = 2 ==> examining statement: # DEBUG sum => sum_7 skip. ==> examining statement: # DEBUG D#2 => j_17 + 1 skip. ==> examining statement: # DEBUG j => D#2 skip. ==> examining statement: # DEBUG sum => sum_7 skip. ==> examining statement: # DEBUG j => D#2 skip. ==> examining statement: # DEBUG i => NULL skip. ==> examining statement: # DEBUG sum => NULL skip. ==> examining statement: # DEBUG i => NULL skip. ==> examining statement: ivtmp_19 = ivtmp_24 - 1; skip. ==> examining statement: i_25 = i_26 + 1; skip. ==> examining statement: ivtmp_46 = ivtmp_45 - 1; skip. ==> examining statement: if (ivtmp_46 != 0) skip. vectorization factor = 2 === vect_analyze_slp === === vect_make_slp_decision === vectorization_factor = 2, niters = 1335 === vect_analyze_data_refs_alignment === recording new base alignment for &u alignment: 16 misalignment: 0 based on: _5 = u[_4]; vect_compute_data_ref_alignment: Unknown alignment for access: u[_4] === vect_prune_runtime_alias_test_list === === vect_enhance_data_refs_alignment === Unknown misalignment, naturally aligned vect_can_advance_ivs_p: Analyze phi: sum_40 = PHI <sum_42(5), sum_7(11)> reduc or virtual phi. skip. Analyze phi: i_26 = PHI <0(5), i_25(11)> Analyze phi: ivtmp_24 = PHI <1335(5), ivtmp_19(11)> Analyze phi: ivtmp_45 = PHI <1335(5), ivtmp_46(11)> vect_model_load_cost: aligned. vect_get_data_access_cost: inside_cost = 12, outside_cost = 0. vect_model_load_cost: unaligned supported by hardware. vect_get_data_access_cost: inside_cost = 12, outside_cost = 0. Vectorizing an unaligned access. === vect_analyze_loop_operations === examining phi: sum_40 = PHI <sum_42(5), sum_7(11)> examining phi: i_26 = PHI <0(5), i_25(11)> examining phi: ivtmp_24 = PHI <1335(5), ivtmp_19(11)> examining phi: ivtmp_45 = PHI <1335(5), ivtmp_46(11)> ==> examining statement: # DEBUG sum => NULL irrelevant. ==> examining statement: # DEBUG i => i_26 irrelevant. ==> examining statement: # DEBUG sum => NULL irrelevant. ==> examining statement: # DEBUG j => 0 irrelevant. ==> examining statement: # DEBUG sum => sum_40 irrelevant. ==> examining statement: # DEBUG j => j_17 irrelevant. ==> examining statement: # DEBUG BEGIN_STMT irrelevant. ==> examining statement: _2 = j_17 * 1335; irrelevant. ==> examining statement: _4 = _2 + i_26; irrelevant. ==> examining statement: _5 = u[_4]; num. args = 4 (not unary/binary/ternary op). vect_is_simple_use: operand u[_4] not ssa-name. use not simple. can't use a fully-masked loop because the target doesn't have the appropriate masked load or store. vect_model_load_cost: unaligned supported by hardware. vect_model_load_cost: inside_cost = 12, prologue_cost = 0 . ==> examining statement: sum_7 = _5 + sum_40; vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal vect_is_simple_use: operand sum_40 def_stmt: sum_40 = PHI <sum_42(5), sum_7(11)> type of def: reduction reduc op not supported by target. vect_model_reduction_cost: inside_cost = 12, prologue_cost = 4, epilogue_cost = 28 . ==> examining statement: # DEBUG sum => sum_7 irrelevant. ==> examining statement: # DEBUG D#2 => j_17 + 1 irrelevant. ==> examining statement: # DEBUG j => D#2 irrelevant. ==> examining statement: # DEBUG sum => sum_7 irrelevant. ==> examining statement: # DEBUG j => D#2 irrelevant. ==> examining statement: # DEBUG i => NULL irrelevant. ==> examining statement: # DEBUG sum => NULL irrelevant. ==> examining statement: # DEBUG i => NULL irrelevant. ==> examining statement: ivtmp_19 = ivtmp_24 - 1; irrelevant. ==> examining statement: i_25 = i_26 + 1; irrelevant. ==> examining statement: ivtmp_46 = ivtmp_45 - 1; irrelevant. ==> examining statement: if (ivtmp_46 != 0) irrelevant. not using a fully-masked loop. Cost model analysis: Vector inside of loop cost: 24 Vector prologue cost: 4 Vector epilogue cost: 44 Scalar iteration cost: 16 Scalar outside cost: 0 Vector outside cost: 48 prologue iterations: 0 epilogue iterations: 1 Calculated minimum iters for profitability: 10 Runtime profitability threshold = 10 Static estimate profitability threshold = 10 epilog loop required vect_can_advance_ivs_p: Analyze phi: sum_40 = PHI <sum_42(5), sum_7(11)> reduc or virtual phi. skip. Analyze phi: i_26 = PHI <0(5), i_25(11)> Analyze phi: ivtmp_24 = PHI <1335(5), ivtmp_19(11)> Analyze phi: ivtmp_45 = PHI <1335(5), ivtmp_46(11)> loop vectorized === vec_transform_loop === vect_can_advance_ivs_p: Analyze phi: sum_40 = PHI <sum_7(11), sum_42(5)> reduc or virtual phi. skip. Analyze phi: i_26 = PHI <i_25(11), 0(5)> Analyze phi: ivtmp_24 = PHI <ivtmp_19(11), 1335(5)> Analyze phi: ivtmp_45 = PHI <ivtmp_46(11), 1335(5)> vect_update_ivs_after_vectorizer: phi: sum_40 = PHI <sum_7(11), sum_42(5)> reduc or virtual phi. skip. vect_update_ivs_after_vectorizer: phi: i_26 = PHI <i_25(11), 0(5)> vect_update_ivs_after_vectorizer: phi: ivtmp_24 = PHI <ivtmp_19(11), 1335(5)> vect_update_ivs_after_vectorizer: phi: ivtmp_45 = PHI <ivtmp_46(11), 1335(5)> ------>vectorizing phi: sum_40 = PHI <sum_7(11), sum_42(16)> transform phi. ------>vectorizing phi: i_26 = PHI <i_25(11), 0(16)> ------>vectorizing phi: ivtmp_24 = PHI <ivtmp_19(11), 1335(16)> ------>vectorizing phi: ivtmp_45 = PHI <ivtmp_46(11), 1335(16)> ------>vectorizing phi: vect_sum_7.15_51 = PHI <(11), (16)> ------>vectorizing statement: # DEBUG sum => NULL ------>vectorizing statement: # DEBUG i => i_26 ------>vectorizing statement: # DEBUG sum => NULL ------>vectorizing statement: # DEBUG j => 0 ------>vectorizing statement: # DEBUG sum => sum_40 ------>vectorizing statement: # DEBUG j => j_17 ------>vectorizing statement: # DEBUG BEGIN_STMT ------>vectorizing statement: _2 = j_17 * 1335; ------>vectorizing statement: _4 = _2 + i_26; ------>vectorizing statement: _5 = u[_4]; transform statement. transform load. ncopies = 1 create vector_type-pointer variable to type: vector(2) double vectorizing an array ref: u created vectp_u.17_52 add new stmt: vect__5.18_58 = MEM[(double *)vectp_u.16_56]; ------>vectorizing statement: sum_7 = _5 + sum_40; transform statement. vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal vect_is_simple_use: operand sum_40 def_stmt: sum_40 = PHI <sum_7(11), sum_42(16)> type of def: reduction reduc op not supported by target. transform reduction. vect_get_vec_def_for_operand: _5 vect_is_simple_use: operand _5 def_stmt: _5 = u[_4]; type of def: internal def_stmt = _5 = u[_4]; vect_get_vec_def_for_operand: sum_40 vect_is_simple_use: operand sum_40 def_stmt: sum_40 = PHI <sum_7(11), sum_42(16)> type of def: reduction def_stmt = sum_40 = PHI <sum_7(11), sum_42(16)> add new stmt: vect_sum_7.19_59 = vect__5.18_58 + vect_sum_7.15_51; vect_is_simple_use: operand sum_42 def_stmt: sum_42 = PHI <0.0(2), sum_37(10)> type of def: external transform reduction: created def-use cycle: vect_sum_7.15_51 = PHI <vect_sum_7.19_59(11), { 0.0, 0.0 }(16)>vect_sum_7.19_59 = vect__5.18_58 + vect_sum_7.15_51; Reduce using vector shifts extract scalar result ------>vectorizing statement: # DEBUG sum => sum_7 ------>vectorizing statement: # DEBUG D#2 => j_17 + 1 ------>vectorizing statement: # DEBUG j => D#2 ------>vectorizing statement: # DEBUG sum => sum_7 ------>vectorizing statement: # DEBUG j => D#2 ------>vectorizing statement: # DEBUG i => NULL ------>vectorizing statement: # DEBUG sum => NULL ------>vectorizing statement: # DEBUG i => NULL ------>vectorizing statement: ivtmp_19 = ivtmp_24 - 1; ------>vectorizing statement: i_25 = i_26 + 1; ------>vectorizing statement: ivtmp_46 = ivtmp_45 - 1; ------>vectorizing statement: vectp_u.16_57 = vectp_u.16_56 + 16; ------>vectorizing statement: if (ivtmp_46 != 0) New loop exit condition: if (ivtmp_66 < 667) LOOP VECTORIZED
  • foo.constprop
21
      sum = sum + u[i + 1335 * j];
22
23
  for (i = 0; i < N; i++)
24
    u[1336 * i] *= 2;
25
26
  *res = sum + N + u[1336 * 2] + u[1336];
27
}
28
29
extern void abort ();
30
31
int
32
loop_interchange_c_main (void)
33
{
34
  int i, j, res;
35
36
  for (i = 0; i < 1782225; i++)
6.96 ldist
  ^Loop 1 not distributed.
  
  • loop_interchange_c_main
6.96 vect

                        
^=== analyzing loop === Analyzing loop at loop-interchange.c:36 === analyze_loop_nest === === vect_analyze_loop_form === === get_loop_niters === === vect_analyze_data_refs === got vectype for stmt: u[i_13] = 2.0e+0;vector(2) double === vect_analyze_scalar_cycles === Analyze phi: i_13 = PHI <0(2), i_6(7)> Access function of PHI: {0, +, 1}_1 step: 1, init: 0 Detected induction. Analyze phi: .MEM_14 = PHI <.MEM_4(D)(2), .MEM_5(7)> Analyze phi: ivtmp_2 = PHI <1782225(2), ivtmp_11(7)> Access function of PHI: {1782225, +, 4294967295}_1 step: 4294967295, init: 1782225 Detected induction. === vect_pattern_recog === === vect_analyze_data_ref_accesses === === vect_mark_stmts_to_be_vectorized === init: phi relevant? i_13 = PHI <0(2), i_6(7)> init: phi relevant? .MEM_14 = PHI <.MEM_4(D)(2), .MEM_5(7)> init: phi relevant? ivtmp_2 = PHI <1782225(2), ivtmp_11(7)> init: stmt relevant? # DEBUG i => i_13 init: stmt relevant? # DEBUG BEGIN_STMT init: stmt relevant? u[i_13] = 2.0e+0; vec_stmt_relevant_p: stmt has vdefs. mark relevant 5, live 0: u[i_13] = 2.0e+0; init: stmt relevant? i_6 = i_13 + 1; init: stmt relevant? # DEBUG i => i_6 init: stmt relevant? # DEBUG i => i_6 init: stmt relevant? ivtmp_11 = ivtmp_2 - 1; init: stmt relevant? if (ivtmp_11 != 0) worklist: examine stmt: u[i_13] = 2.0e+0; === vect_analyze_data_ref_dependences === === vect_determine_vectorization_factor === ==> examining phi: i_13 = PHI <0(2), i_6(7)> ==> examining phi: .MEM_14 = PHI <.MEM_4(D)(2), .MEM_5(7)> ==> examining phi: ivtmp_2 = PHI <1782225(2), ivtmp_11(7)> ==> examining statement: # DEBUG i => i_13 skip. ==> examining statement: # DEBUG BEGIN_STMT skip. ==> examining statement: u[i_13] = 2.0e+0; get vectype for scalar type: double vectype: vector(2) double nunits = 2 ==> examining statement: i_6 = i_13 + 1; skip. ==> examining statement: # DEBUG i => i_6 skip. ==> examining statement: # DEBUG i => i_6 skip. ==> examining statement: ivtmp_11 = ivtmp_2 - 1; skip. ==> examining statement: if (ivtmp_11 != 0) skip. vectorization factor = 2 === vect_analyze_slp === === vect_make_slp_decision === vectorization_factor = 2, niters = 1782225 === vect_analyze_data_refs_alignment === recording new base alignment for &u alignment: 16 misalignment: 0 based on: u[i_13] = 2.0e+0; vect_compute_data_ref_alignment: misalign = 0 bytes of ref u[i_13] === vect_prune_runtime_alias_test_list === === vect_enhance_data_refs_alignment === vect_can_advance_ivs_p: Analyze phi: i_13 = PHI <0(2), i_6(7)> Analyze phi: .MEM_14 = PHI <.MEM_4(D)(2), .MEM_5(7)> reduc or virtual phi. skip. Analyze phi: ivtmp_2 = PHI <1782225(2), ivtmp_11(7)> vect_model_store_cost: aligned. vect_get_data_access_cost: inside_cost = 12, outside_cost = 0. === vect_analyze_loop_operations === examining phi: i_13 = PHI <0(2), i_6(7)> examining phi: .MEM_14 = PHI <.MEM_4(D)(2), .MEM_5(7)> examining phi: ivtmp_2 = PHI <1782225(2), ivtmp_11(7)> ==> examining statement: # DEBUG i => i_13 irrelevant. ==> examining statement: # DEBUG BEGIN_STMT irrelevant. ==> examining statement: u[i_13] = 2.0e+0; vect_is_simple_use: operand 2.0e+0 can't use a fully-masked loop because the target doesn't have the appropriate masked load or store. vect_model_store_cost: aligned. vect_model_store_cost: inside_cost = 12, prologue_cost = 4 . ==> examining statement: i_6 = i_13 + 1; irrelevant. ==> examining statement: # DEBUG i => i_6 irrelevant. ==> examining statement: # DEBUG i => i_6 irrelevant. ==> examining statement: ivtmp_11 = ivtmp_2 - 1; irrelevant. ==> examining statement: if (ivtmp_11 != 0) irrelevant. not using a fully-masked loop. Cost model analysis: Vector inside of loop cost: 12 Vector prologue cost: 4 Vector epilogue cost: 12 Scalar iteration cost: 12 Scalar outside cost: 0 Vector outside cost: 16 prologue iterations: 0 epilogue iterations: 1 Calculated minimum iters for profitability: 2 Runtime profitability threshold = 2 Static estimate profitability threshold = 2 epilog loop required vect_can_advance_ivs_p: Analyze phi: i_13 = PHI <0(2), i_6(7)> Analyze phi: .MEM_14 = PHI <.MEM_4(D)(2), .MEM_5(7)> reduc or virtual phi. skip. Analyze phi: ivtmp_2 = PHI <1782225(2), ivtmp_11(7)> loop vectorized === vec_transform_loop === vect_can_advance_ivs_p: Analyze phi: i_13 = PHI <i_6(7), 0(2)> Analyze phi: .MEM_14 = PHI <.MEM_5(7), .MEM_4(D)(2)> reduc or virtual phi. skip. Analyze phi: ivtmp_2 = PHI <ivtmp_11(7), 1782225(2)> vect_update_ivs_after_vectorizer: phi: i_13 = PHI <i_6(7), 0(2)> vect_update_ivs_after_vectorizer: phi: .MEM_14 = PHI <.MEM_5(7), .MEM_4(D)(2)> reduc or virtual phi. skip. vect_update_ivs_after_vectorizer: phi: ivtmp_2 = PHI <ivtmp_11(7), 1782225(2)> ------>vectorizing phi: i_13 = PHI <i_6(7), 0(12)> ------>vectorizing phi: .MEM_14 = PHI <.MEM_5(7), .MEM_4(D)(12)> ------>vectorizing phi: ivtmp_2 = PHI <ivtmp_11(7), 1782225(12)> ------>vectorizing statement: # DEBUG i => i_13 ------>vectorizing statement: # DEBUG BEGIN_STMT ------>vectorizing statement: u[i_13] = 2.0e+0; transform statement. vect_is_simple_use: operand 2.0e+0 transform store. ncopies = 1 vect_get_vec_def_for_operand: 2.0e+0 vect_is_simple_use: operand 2.0e+0 created new init_stmt: vect_cst__20 = { 2.0e+0, 2.0e+0 }; create vector_type-pointer variable to type: vector(2) double vectorizing an array ref: u created &u add new stmt: MEM[(double *)vectp_u.3_21] = vect_cst__20; ------>vectorizing statement: i_6 = i_13 + 1; ------>vectorizing statement: # DEBUG i => i_6 ------>vectorizing statement: # DEBUG i => i_6 ------>vectorizing statement: ivtmp_11 = ivtmp_2 - 1; ------>vectorizing statement: vectp_u.3_22 = vectp_u.3_21 + 16; ------>vectorizing statement: if (ivtmp_11 != 0) New loop exit condition: if (ivtmp_25 < 891112) LOOP VECTORIZED
  • loop_interchange_c_main
37
    u[i] = 2;
38
39
  foo (1335, &res);
0.00 inline
  ^  not inlinable: loop_interchange_c_main/2 -> foo.constprop/4, function not inlinable
  
  • loop_interchange_c_main
0.00 inline
  ^  not inlinable: loop_interchange_c_main/2 -> foo.constprop/4, function not inlinable
  
  • loop_interchange_c_main
0.00 inline
  ^  not inlinable: loop_interchange_c_main/2 -> foo.constprop/4, function not inlinable
  
  • loop_interchange_c_main
40
41
#if DEBUG
42
  fprintf (stderr, "res = %d \n", res);
43
#endif
44
45
  if (res != 3565793)
46
    abort ();
0.00 inline
    ^  not inlinable: loop_interchange_c_main/2 -> abort/3, function body not available
    
  • loop_interchange_c_main
47
48
  return 0;
49
}
50
51
/* { dg-final { scan-tree-dump-times "Loop_pair<outer:., inner:.> is interchanged" 1 "linterchange"} } */