File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -564,7 +564,20 @@ bool llvm::DenseMapInfo<SimpleValue>::isEqual(SimpleValue LHS,
564564 return true ;
565565 return false ;
566566 };
567- return LHSI->getKind () == RHSI->getKind () && LHSI->isIdenticalTo (RHSI, opCmp);
567+ bool isEqual =
568+ LHSI->getKind () == RHSI->getKind () && LHSI->isIdenticalTo (RHSI, opCmp);
569+ #ifdef NDEBUG
570+ if (isEqual && getHashValue (LHS) != getHashValue (RHS)) {
571+ llvm::dbgs () << " LHS: " ;
572+ LHSI->dump ();
573+ llvm::dbgs () << " RHS: " ;
574+ RHSI->dump ();
575+ llvm::dbgs () << " In function:\n " ;
576+ LHSI->getFunction ()->dump ();
577+ llvm_unreachable (" Mismatched isEqual and getHashValue() function in CSE\n " );
578+ }
579+ #endif
580+ return isEqual;
568581}
569582
570583namespace {
You can’t perform that action at this time.
0 commit comments