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,
564
564
return true ;
565
565
return false ;
566
566
};
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;
568
581
}
569
582
570
583
namespace {
You can’t perform that action at this time.
0 commit comments