diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-10-31 19:52:12 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-10-31 19:52:12 +0000 |
commit | 956a43193076fc71c578115c66962496ec75b33a (patch) | |
tree | e79a53509b26ee80ea2ffdb6c7571f4aeffb545c /lib/Target/Alpha/AlphaISelDAGToDAG.cpp | |
parent | a54f6b16f9b7a30044a98de79a72dae4f2dcc04c (diff) | |
download | external_llvm-956a43193076fc71c578115c66962496ec75b33a.zip external_llvm-956a43193076fc71c578115c66962496ec75b33a.tar.gz external_llvm-956a43193076fc71c578115c66962496ec75b33a.tar.bz2 |
Let us play simplify the td file (and fix a few missed sub and mul patterns).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaISelDAGToDAG.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp index 15ee143..0903abb 100644 --- a/lib/Target/Alpha/AlphaISelDAGToDAG.cpp +++ b/lib/Target/Alpha/AlphaISelDAGToDAG.cpp @@ -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))); |