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(
367
367
for (Instruction *U : Uses) {
368
368
// Replace all converted operands for a use.
369
369
for (auto [OpIdx, Op] : enumerate(U->operands ())) {
370
- if (ValMap.contains (Op) && ValMap[Op] ) {
370
+ if (Value *Val = ValMap.lookup (Op)) {
371
371
Value *NewVal = nullptr ;
372
372
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 ];
375
375
else {
376
376
BasicBlock::iterator InsertPt = U->getParent ()->getFirstNonPHIIt ();
377
377
// We may pick up ops that were previously converted for users in
You can’t perform that action at this time.
0 commit comments