AMDGPU: Insert moves of frame index to value operands
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 23 Mar 2016 21:49:25 +0000 (21:49 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 23 Mar 2016 21:49:25 +0000 (21:49 +0000)
commitf43c2a0b4967626c7255940a7317ec4c8c9e9319
treef27a5a2c8fa22e8ff0e614efbe33c98c748f3c26
parent94710840fb2e1a16a75124593314b60bf13a0a3a
AMDGPU: Insert moves of frame index to value operands

Strengthen tests of storing frame indices.

Right now this just creates irrelevant scheduling changes.

We don't want to have multiple frame index operands
on an instruction. There seem to be various assumptions
that at least the same frame index will not appear twice
in the LocalStackSlotAllocation pass.

There's no reason to have this happen, and it just
makes it easy to introduce bugs where the immediate
offset is appplied to the storing instruction when it should
really be applied to the value being stored as a separate
add.

This might not be sufficient. It might still be problematic
to have an add fi, fi situation, but that's even less unlikely
to happen in real code.

llvm-svn: 264200
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
llvm/test/CodeGen/AMDGPU/captured-frame-index.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/promote-alloca-stored-pointer-value.ll