summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/R600/AMDGPUISelLowering.h
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2015-05-24 00:51:27 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2015-05-24 00:51:27 +0000
commit65ad1602b038549dfff4e8e2fe30dac15e45189d (patch)
treec03cf718e5e9fdc2cfc6eb633fbde3d35f134e89 /llvm/lib/Target/R600/AMDGPUISelLowering.h
parentdc4c87f051871ddd4abd252a9755ffd26c9ce565 (diff)
downloadbcm5719-llvm-65ad1602b038549dfff4e8e2fe30dac15e45189d.tar.gz
bcm5719-llvm-65ad1602b038549dfff4e8e2fe30dac15e45189d.zip
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. llvm-svn: 238108
Diffstat (limited to 'llvm/lib/Target/R600/AMDGPUISelLowering.h')
-rw-r--r--llvm/lib/Target/R600/AMDGPUISelLowering.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUISelLowering.h b/llvm/lib/Target/R600/AMDGPUISelLowering.h
index 8507cb3c745..c9f198129ef 100644
--- a/llvm/lib/Target/R600/AMDGPUISelLowering.h
+++ b/llvm/lib/Target/R600/AMDGPUISelLowering.h
@@ -133,6 +133,10 @@ public:
EVT ExtVT) const override;
bool isLoadBitCastBeneficial(EVT, EVT) const override;
+
+ bool storeOfVectorConstantIsCheap(EVT MemVT,
+ unsigned NumElem,
+ unsigned AS) const override;
bool isCheapToSpeculateCttz() const override;
bool isCheapToSpeculateCtlz() const override;
OpenPOWER on IntegriCloud