[llvm] r218252 - R600: Don't set BypassSlowDiv for 64-bit division

Tom Stellard thomas.stellard at amd.com
Mon Sep 22 08:35:32 PDT 2014


Author: tstellar
Date: Mon Sep 22 10:35:32 2014
New Revision: 218252

URL: http://llvm.org/viewvc/llvm-project?rev=218252&view=rev
Log:
R600: Don't set BypassSlowDiv for 64-bit division

BypassSlowDiv is used by codegen prepare to insert a run-time
check to see if the operands to a 64-bit division are really 32-bit
values and if they are it will do 32-bit division instead.

This is not useful for R600, which has predicated control flow since
both the 32-bit and 64-bit paths will be executed in most cases.  It
also increases code size which can lead to more instruction cache
misses.

Modified:
    llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp

Modified: llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp?rev=218252&r1=218251&r2=218252&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp Mon Sep 22 10:35:32 2014
@@ -392,9 +392,6 @@ AMDGPUTargetLowering::AMDGPUTargetLoweri
   setIntDivIsCheap(false);
   setPow2SDivIsCheap(false);
 
-  // TODO: Investigate this when 64-bit divides are implemented.
-  addBypassSlowDiv(64, 32);
-
   // FIXME: Need to really handle these.
   MaxStoresPerMemcpy  = 4096;
   MaxStoresPerMemmove = 4096;





More information about the llvm-commits mailing list