mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 06:38:20 +00:00
Make these predicates return true for bit_convert(buildvector)'s as well as
buildvectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27723 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -73,6 +73,10 @@ bool ConstantFPSDNode::isExactlyValue(double V) const {
|
|||||||
/// isBuildVectorAllOnes - Return true if the specified node is a
|
/// isBuildVectorAllOnes - Return true if the specified node is a
|
||||||
/// BUILD_VECTOR where all of the elements are ~0 or undef.
|
/// BUILD_VECTOR where all of the elements are ~0 or undef.
|
||||||
bool ISD::isBuildVectorAllOnes(const SDNode *N) {
|
bool ISD::isBuildVectorAllOnes(const SDNode *N) {
|
||||||
|
// Look through a bit convert.
|
||||||
|
if (N->getOpcode() == ISD::BIT_CONVERT)
|
||||||
|
N = N->getOperand(0).Val;
|
||||||
|
|
||||||
if (N->getOpcode() != ISD::BUILD_VECTOR) return false;
|
if (N->getOpcode() != ISD::BUILD_VECTOR) return false;
|
||||||
|
|
||||||
unsigned i = 0, e = N->getNumOperands();
|
unsigned i = 0, e = N->getNumOperands();
|
||||||
@ -117,6 +121,10 @@ bool ISD::isBuildVectorAllOnes(const SDNode *N) {
|
|||||||
/// isBuildVectorAllZeros - Return true if the specified node is a
|
/// isBuildVectorAllZeros - Return true if the specified node is a
|
||||||
/// BUILD_VECTOR where all of the elements are 0 or undef.
|
/// BUILD_VECTOR where all of the elements are 0 or undef.
|
||||||
bool ISD::isBuildVectorAllZeros(const SDNode *N) {
|
bool ISD::isBuildVectorAllZeros(const SDNode *N) {
|
||||||
|
// Look through a bit convert.
|
||||||
|
if (N->getOpcode() == ISD::BIT_CONVERT)
|
||||||
|
N = N->getOperand(0).Val;
|
||||||
|
|
||||||
if (N->getOpcode() != ISD::BUILD_VECTOR) return false;
|
if (N->getOpcode() != ISD::BUILD_VECTOR) return false;
|
||||||
|
|
||||||
unsigned i = 0, e = N->getNumOperands();
|
unsigned i = 0, e = N->getNumOperands();
|
||||||
|
Reference in New Issue
Block a user