@@ -1487,9 +1487,7 @@ impl<'tcx> VnState<'_, 'tcx> {
1487
1487
#[ instrument( level = "trace" , skip( self , index) , ret) ]
1488
1488
fn try_as_constant ( & mut self , index : VnIndex ) -> Option < ConstOperand < ' tcx > > {
1489
1489
// This was already constant in MIR, do not change it.
1490
- let value = self . get ( index) ;
1491
- debug ! ( ?index, ?value) ;
1492
- if let Value :: Constant { value, disambiguator : _ } = * value
1490
+ if let Value :: Constant { value, disambiguator : _ } = * self . get ( index)
1493
1491
// If the constant is not deterministic, adding an additional mention of it in MIR will
1494
1492
// not give the same value as the former mention.
1495
1493
&& value. is_deterministic ( )
@@ -1557,10 +1555,8 @@ impl<'tcx> MutVisitor<'tcx> for VnState<'_, 'tcx> {
1557
1555
. as_local ( )
1558
1556
. and_then ( |local| self . locals [ local] )
1559
1557
. or_else ( || self . simplify_rvalue ( rvalue, location) ) ;
1560
- debug ! ( ?value) ;
1561
1558
let Some ( value) = value else { return } ;
1562
1559
1563
- debug ! ( before_rvalue = ?rvalue) ;
1564
1560
// De-duplicate locals has the same arrays assigned to prevent code bloat.
1565
1561
let disallowed_duplicated_array = if rvalue. ty ( self . local_decls , self . tcx ) . is_array ( )
1566
1562
&& let Some ( locals) = self . rev_locals . get ( value) . as_deref ( )
@@ -1579,7 +1575,6 @@ impl<'tcx> MutVisitor<'tcx> for VnState<'_, 'tcx> {
1579
1575
* rvalue = Rvalue :: Use ( Operand :: Copy ( local. into ( ) ) ) ;
1580
1576
self . reused_locals . insert ( local) ;
1581
1577
}
1582
- debug ! ( after_rvalue = ?rvalue) ;
1583
1578
1584
1579
return ;
1585
1580
}
0 commit comments