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 @@ -367,11 +367,11 @@ bool LiveRegOptimizer::optimizeLiveType(
367367 for (Instruction *U : Uses) {
368368 // Replace all converted operands for a use.
369369 for (auto [OpIdx, Op] : enumerate(U->operands ())) {
370- if (ValMap.contains (Op) && ValMap[Op] ) {
370+ if (Value *Val = ValMap.lookup (Op)) {
371371 Value *NewVal = nullptr ;
372372 if (BBUseValMap.contains (U->getParent ()) &&
373- BBUseValMap[U->getParent ()].contains (ValMap[Op] ))
374- NewVal = BBUseValMap[U->getParent ()][ValMap[Op] ];
373+ BBUseValMap[U->getParent ()].contains (Val ))
374+ NewVal = BBUseValMap[U->getParent ()][Val ];
375375 else {
376376 BasicBlock::iterator InsertPt = U->getParent ()->getFirstNonPHIIt ();
377377 // We may pick up ops that were previously converted for users in
You can’t perform that action at this time.
0 commit comments