diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 98f03a294c8..f1933349cbe 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -10022,7 +10022,7 @@ static bool LowerToBSwap(CallInst *CI) { // so don't worry about this. // Verify this is a simple bswap. - if (CI->getNumOperands() != 2 || + if (CI->getNumArgOperands() != 1 || CI->getType() != CI->getArgOperand(0)->getType() || !CI->getType()->isIntegerTy()) return false;