File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -669,15 +669,15 @@ Value *MemCmpExpansion::getMemCmpOneBlock() {
669669 if (CI->hasOneUser ()) {
670670 auto *UI = cast<Instruction>(*CI->user_begin ());
671671 CmpPredicate Pred = ICmpInst::Predicate::BAD_ICMP_PREDICATE;
672- uint64_t Shift;
673672 bool NeedsZExt = false ;
674673 // This is a special case because instead of checking if the result is less
675674 // than zero:
676675 // bool result = memcmp(a, b, NBYTES) < 0;
677676 // Compiler is clever enough to generate the following code:
678677 // bool result = memcmp(a, b, NBYTES) >> 31;
679- if (match (UI, m_LShr (m_Value (), m_ConstantInt (Shift))) &&
680- Shift == (CI->getType ()->getIntegerBitWidth () - 1 )) {
678+ if (match (UI,
679+ m_LShr (m_Value (),
680+ m_SpecificInt (CI->getType ()->getIntegerBitWidth () - 1 )))) {
681681 Pred = ICmpInst::ICMP_SLT;
682682 NeedsZExt = true ;
683683 } else {
You can’t perform that action at this time.
0 commit comments