Let us play simplify the td file (and fix a few missed sub and mul patterns).
[oota-llvm.git] / lib / Target / Alpha / AlphaISelDAGToDAG.cpp
index 15ee143172cc8e337251e6aea47b8ba2ebcd93f1..0903abba2749f485492824e90a6423db0ddd9989 100644 (file)
@@ -122,6 +122,14 @@ namespace {
         return comphigh;
     }
 
+    static bool chkRemNearPower2(uint64_t x, uint64_t r, bool swap) {
+      uint64_t y = getNearPower2(x);
+      if (swap)
+        return (y - x) == r;
+      else
+        return (x - y) == r;
+    }
+
     static bool isFPZ(SDOperand N) {
       ConstantFPSDNode *CN = dyn_cast<ConstantFPSDNode>(N);
       return (CN && (CN->isExactlyValue(+0.0) || CN->isExactlyValue(-0.0)));