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() {
669
669
if (CI->hasOneUser ()) {
670
670
auto *UI = cast<Instruction>(*CI->user_begin ());
671
671
CmpPredicate Pred = ICmpInst::Predicate::BAD_ICMP_PREDICATE;
672
- uint64_t Shift;
673
672
bool NeedsZExt = false ;
674
673
// This is a special case because instead of checking if the result is less
675
674
// than zero:
676
675
// bool result = memcmp(a, b, NBYTES) < 0;
677
676
// Compiler is clever enough to generate the following code:
678
677
// 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 )))) {
681
681
Pred = ICmpInst::ICMP_SLT;
682
682
NeedsZExt = true ;
683
683
} else {
You can’t perform that action at this time.
0 commit comments