Page MenuHomePhabricator

Don't create illegal memset with address space >= 256 in memcpyopt.
AbandonedPublic

Authored by mjacob on Jan 26 2015, 4:35 AM.

Details

Reviewers
None
Summary

Memcpy / memset for address spaces >= 256 are not supported in the
code generator. This commit adds an extra check that stops the pass from
creating such illegal memsets.

Diff Detail

Event Timeline

mjacob updated this revision to Diff 18752.Jan 26 2015, 4:35 AM
mjacob retitled this revision from to Don't create illegal memset with address space >= 256 in memcpyopt..
mjacob updated this object.
mjacob edited the test plan for this revision. (Show Details)
mjacob added subscribers: theraven, Unknown Object (MLST).

This seems target dependent. Im not sure why, but, for example, SystemZ does permit it (or at the very least, continues to form the call. Perhaps move this behind a target specific check?

For the test, can you actually run it explicitly against all the architectures we support?

This seems target dependent. Im not sure why, but, for example, SystemZ does permit it (or at the very least, continues to form the call. Perhaps move this behind a target specific check?

I don't think this is target dependent. See this assert. It fails for any target if the address space is >= 256. As I said on IRC, you probably tested with assertions disabled.

mjacob abandoned this revision.Jan 28 2015, 7:07 AM

As Matt Arsenault pointed out on the mailing list, this assert is actually a bug and is implicitly assuming the X86 target. A FIXME was added in rL227191.

I'm abandoning this revision because my assumption, based on that assert, that memset is supported iff the address space is < 256 turned out to be wrong.