summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2014-06-15 19:48:16 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2014-06-15 19:48:16 +0000
commitcf9a9a148e9d80d89ad24be08b45c1bd7f71463a (patch)
treeb106f9fa1da07a661cbdc433f67cf09a93c24a61 /llvm/lib
parent66ee0816dae60e77c4a292586525cee1d96f6ced (diff)
downloadbcm5719-llvm-cf9a9a148e9d80d89ad24be08b45c1bd7f71463a.tar.gz
bcm5719-llvm-cf9a9a148e9d80d89ad24be08b45c1bd7f71463a.zip
R600: Report that integer division is expensive.
Divides by weird constants now emit much better code. llvm-svn: 210995
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/R600/AMDGPUISelLowering.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp b/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
index 7867de23fd2..d4fd3164fd8 100644
--- a/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
+++ b/llvm/lib/Target/R600/AMDGPUISelLowering.cpp
@@ -327,6 +327,13 @@ AMDGPUTargetLowering::AMDGPUTargetLowering(TargetMachine &TM) :
setSchedulingPreference(Sched::RegPressure);
setJumpIsExpensive(true);
+ // There are no integer divide instructions, and these expand to a pretty
+ // large sequence of instructions.
+ setIntDivIsCheap(false);
+
+ // TODO: Investigate this when 64-bit divides are implemented.
+ addBypassSlowDiv(64, 32);
+
// FIXME: Need to really handle these.
MaxStoresPerMemcpy = 4096;
MaxStoresPerMemmove = 4096;
OpenPOWER on IntegriCloud