This is an archive of the discontinued LLVM Phabricator instance.

DAG: Undo and->or combine with FrameIndexes
ClosedPublic

Authored by arsenm on Jun 2 2017, 1:32 PM.

Details

Reviewers
ast
Summary

This pattern shows up when lowering byval copies on AMDGPU.

The byval object access is split into 4-byte chunks, adding a
constant offset to the FixedStack base. When some of the offsets
turn into ors, this prevents combining the constant offsets.

This makes it not apparent that the object is there when matching
addressing modes, so it ends up using a scratch wave offset
relative access and the lengthy frame index expansion for that.

Diff Detail

Event Timeline

arsenm created this revision.Jun 2 2017, 1:32 PM
ast accepted this revision.Jun 2 2017, 4:07 PM
ast added a subscriber: ast.

bpf side looks good and this undo of 'or' back into 'add' is useful for bpf backend as well,
since 'ptr |= const' is not recognized by the kernel and bpf backend emits only 'ptr +=' which causes unnecessary ugly code in places like in this test.

This revision is now accepted and ready to land.Jun 2 2017, 4:07 PM
arsenm updated this revision to Diff 106441.Jul 13 2017, 9:29 AM

BPF test changes

arsenm closed this revision.Aug 1 2017, 5:44 PM

r309775