This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49695] New: conditional moves for stores
- From: "revital.eres at linaro dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 10 Jul 2011 10:04:57 +0000
- Subject: [Bug tree-optimization/49695] New: conditional moves for stores
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49695
Summary: conditional moves for stores
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: revital.eres@linaro.org
for (i = 0; i < point1->len; i++)
{
if (point1->arr[i].val)
{
point1->arr[i].val ^= (unsigned long long) res;
}
}
For the above loop if-conversion is not been done in the tree level (compiled
with trunk -r176116). Seemingly this case is similar to the one in PR27313.
When using -ftree-loop-if-convert-stores I get 'tree could trap...' message
although I'm not sure why as there is a read in every iteration of the loop to
the memory location we write to.
Similar case appears in SPEC2006/libquantum.
Here's a snippet from .ifcvt file:
<bb 3>:
pretmp.6_33 = point1_3(D)->arr;
<bb 4>:
# i_27 = PHI <i_22(7), 0(3)>
i.0_6 = (unsigned int) i_27;
D.3689_7 = i.0_6 * 8;
D.3690_8 = pretmp.6_33 + D.3689_7;
D.3691_9 = D.3690_8->val;
if (D.3691_9 != 0)
goto <bb 5>;
else
goto <bb 6>;
<bb 5>:
D.3694_20 = (long long unsigned int) res_19(D);
D.3695_21 = D.3694_20 ^ D.3691_9;
D.3690_8->val = D.3695_21;
<bb 6>:
i_22 = i_27 + 1;
if (i_22 < D.3696_29)
goto <bb 7>;
else
goto <bb 8>;
<bb 7>:
goto <bb 4>;