ConnectedVNInfoEqClasses::Classify().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122202
91177308-0d34-0410-b5e6-
96231b3b80d8
// operand constraint?
if (const VNInfo *UVNI = LI->getVNInfoAt(VNI->def.getUseIndex()))
Connect(VNI->id, UVNI->id);
+
+ // Check for a tied operand constraint involving an early clobber def,
+ // where one VN ends right before the use index and the next VN is defined
+ // at the same use index.
+ if (VNI->def.isUse()) {
+ if (const VNInfo *PVNI = LI->getVNInfoAt(VNI->def.getLoadIndex()))
+ Connect(PVNI->id, VNI->id);
+ }
}
}