Zap unnecessary isIntDivCheap() check. PR11485. No testcase because this doesn...
authorEli Friedman <eli.friedman@gmail.com>
Wed, 7 Dec 2011 03:55:52 +0000 (03:55 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Wed, 7 Dec 2011 03:55:52 +0000 (03:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146015 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 2824fdb8860d1f07525c0994fb10cf5607358391..9f628e95403bb1c855cbf32eba8193bfd08ffe50 100644 (file)
@@ -1777,7 +1777,7 @@ SDValue DAGCombiner::visitSDIV(SDNode *N) {
                          N0, N1);
   }
   // fold (sdiv X, pow2) -> simple ops after legalize
-  if (N1C && !N1C->isNullValue() && !TLI.isIntDivCheap() &&
+  if (N1C && !N1C->isNullValue() &&
       (N1C->getAPIntValue().isPowerOf2() ||
        (-N1C->getAPIntValue()).isPowerOf2())) {
     // If dividing by powers of two is cheap, then don't perform the following