summaryrefslogtreecommitdiff
path: root/lib/Target/R600
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
commit61bfbc4d966f1c1bcf9aabe36500d643d821fe43 (patch)
treecb727c1d00c810d0b929f9f5822735d12271e3af /lib/Target/R600
parent36b9c7c87210e6d985c08e68b4ecdd59cf764cee (diff)
downloadllvm-61bfbc4d966f1c1bcf9aabe36500d643d821fe43.tar.gz
llvm-61bfbc4d966f1c1bcf9aabe36500d643d821fe43.tar.bz2
llvm-61bfbc4d966f1c1bcf9aabe36500d643d821fe43.tar.xz
R600: Report that integer division is expensive.
Divides by weird constants now emit much better code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600')
-rw-r--r--lib/Target/R600/AMDGPUISelLowering.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp
index 7867de23fd..d4fd3164fd 100644
--- a/lib/Target/R600/AMDGPUISelLowering.cpp
+++ b/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;