DAG: Undo and->or combine with FrameIndexes
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 2 Aug 2017 00:43:42 +0000 (00:43 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 2 Aug 2017 00:43:42 +0000 (00:43 +0000)
commitacc5e82b0e33a27ba64ccb4f88c81fe8709d4576
treede36eb055031183f0de7f2f65c688c27091bb987
parent6b898beb8e6bf5739d43c1d64646264afc595de8
DAG: Undo and->or combine with FrameIndexes

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.

llvm-svn: 309775
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/arm64-abi-varargs.ll
llvm/test/CodeGen/AMDGPU/byval-frame-setup.ll
llvm/test/CodeGen/BPF/undef.ll