[Bug tree-optimization/65206] Vectorized version of loop is removed.
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 25 15:08:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65206
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
We apply versioning for aliasing but compute it as always aliasing in some way,
thus the runtime check gets immediately folded and thus the vectorized loop
removed:
t.c:7:3: note: create runtime check for data references a1[i_16] and *_34
t.c:7:3: note: created 1 versioning for alias checks.
t.c:7:3: note: loop versioned for vectorization because of possible aliasing
...
but I see the alias runtime check nowhere.
The DRs are
(gdb) p debug_data_reference (dr_a.dr)
#(Data Ref:
# bb: 4
# stmt: _5 = a1[i_16];
# ref: a1[i_16];
# base_object: a1;
# Access function 0: {0, +, 1}_1
#)
$17 = void
(gdb) p debug_data_reference (dr_b.dr)
#(Data Ref:
# bb: 4
# stmt: MASK_STORE (_34, 0B, _ifc__32, _9);
# ref: *_34;
# base_object: MEM[(float *)&a1];
# Access function 0: {0B, +, 4}_1
#)
so maybe the code doing masked loads/stores updates the DRs in a way that
will later confuse runtime alias checking. Or for some reason it doesn't
update it enough to make data-dependence analysis handle it.
Clearly this is a must-dependence (but with known distance), so sth
that data dependence analysis should handle and sth that the runtime
alias checking isn't handling.
More information about the Gcc-bugs
mailing list