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
URL:
Keywords: alias, missed-optimization, testsuite-fail
Depends on:
Blocks:
 
Reported: 2008-06-18 00:36 UTC by Andy Hutchinson
Modified: 2021-12-25 22:24 UTC (History)
2 users (show)

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


Attachments

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.