Bug 36561 - store using long array index not hoisted out of loop
Summary: store using long array index not hoisted out of loop
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.4.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: alias, missed-optimization
Depends on:
Reported: 2008-06-18 00:36 UTC by Andy Hutchinson
Modified: 2012-03-03 16:47 UTC (History)
2 users (show)

See Also:
Target: avr-unkown-none
Known to work:
Known to fail: 4.7.0
Last reconfirmed: 2012-02-17 16:22:07


Note You need to log in before you can comment on or make changes to this bug.
Description Andy Hutchinson 2008-06-18 00:36:57 UTC
Testsuite test  gcc.dg/tree-ssa/loop35.c fails for avr target for test3().

This test uses long array index. Tests with int or char index get hoisted as expected.

void test3(unsigned long b)
  unsigned i;

  /* And here.  */
  for (i = 0; i < 100; i++)
      arr[b+8].X += i;
      arr[b+9].X += i;

Richard Guenther indicates:
> This is because the alias-oracle for store-motion doesn't handle conversions
> to sizetype well in the offset disambiguation.
Comment 1 Richard Biener 2008-06-21 16:22:07 UTC
Confirmed.  See also related XFAILs on LP64 targets.