forked from OSchip/llvm-project
The first operand to AND does not always have more than two operands. This
fixes MediaBench/toast with the dag selector llvm-svn: 23141
This commit is contained in:
parent
e75b5e63a7
commit
e413b60632
|
@ -167,7 +167,8 @@ static bool isRotateAndMask(SDNode *N, unsigned Mask, bool IsShiftMask,
|
|||
unsigned Shift = 32;
|
||||
unsigned Indeterminant = ~0; // bit mask marking indeterminant results
|
||||
unsigned Opcode = N->getOpcode();
|
||||
if (!isIntImmediate(N->getOperand(1).Val, Shift) || (Shift > 31))
|
||||
if (N->getNumOperands() != 2 ||
|
||||
!isIntImmediate(N->getOperand(1).Val, Shift) || (Shift > 31))
|
||||
return false;
|
||||
|
||||
if (Opcode == ISD::SHL) {
|
||||
|
|
Loading…
Reference in New Issue