forked from OSchip/llvm-project
[WebAssembly] Update calls to computeKnownBits after the changes from r301620.
I didn't realize WebAssembly wasn't a default build target so I missed that changes were needed. llvm-svn: 301629
This commit is contained in:
parent
5f0ab9e51d
commit
053cf4da9d
|
@ -18,6 +18,7 @@
|
|||
#include "llvm/CodeGen/SelectionDAGISel.h"
|
||||
#include "llvm/IR/Function.h" // To access function attributes.
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/KnownBits.h"
|
||||
#include "llvm/Support/MathExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
|
|
|
@ -33,11 +33,11 @@ def or_is_add : PatFrag<(ops node:$lhs, node:$rhs), (or node:$lhs, node:$rhs),[{
|
|||
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N->getOperand(1)))
|
||||
return CurDAG->MaskedValueIsZero(N->getOperand(0), CN->getAPIntValue());
|
||||
|
||||
APInt KnownZero0, KnownOne0;
|
||||
CurDAG->computeKnownBits(N->getOperand(0), KnownZero0, KnownOne0, 0);
|
||||
APInt KnownZero1, KnownOne1;
|
||||
CurDAG->computeKnownBits(N->getOperand(1), KnownZero1, KnownOne1, 0);
|
||||
return (~KnownZero0 & ~KnownZero1) == 0;
|
||||
KnownBits Known0;
|
||||
CurDAG->computeKnownBits(N->getOperand(0), Known0, 0);
|
||||
KnownBits Known1;
|
||||
CurDAG->computeKnownBits(N->getOperand(1), Known1, 0);
|
||||
return (~Known0.Zero & ~Known1.Zero) == 0;
|
||||
}]>;
|
||||
|
||||
// GlobalAddresses are conceptually unsigned values, so we can also fold them
|
||||
|
|
Loading…
Reference in New Issue