Add target hook to allow merging stores of nonzero constants
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 24 May 2015 00:51:27 +0000 (00:51 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 24 May 2015 00:51:27 +0000 (00:51 +0000)
commitf44ed0919cbd91fe77aacdfe47701a6d664f1049
tree26eae57c0b29d44f25d0f29aaa9efc6c37470f9f
parentc009e842cb5b930782ebf0b9d210fc7fba9d8d48
Add target hook to allow merging stores of nonzero constants

On GPU targets, materializing constants is cheap and stores are
expensive, so only doing this for zero vectors was silly.

Most of the new testcases aren't optimally merged, and are for
later improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238108 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/R600/AMDGPUISelLowering.cpp
lib/Target/R600/AMDGPUISelLowering.h
test/CodeGen/R600/merge-stores.ll [new file with mode: 0644]
test/CodeGen/R600/store.ll