File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ impl FunctionIRVerifier<'_> {
2626 }
2727
2828 fn verify_temp_def ( & mut self , id : TempId ) {
29- self . ir . temps . len ( ) > id. index ( ) ;
29+ self . ir . temps . len ( ) > id. index ( ) as usize ;
3030 self . defined . insert ( id) ;
3131 }
3232
@@ -36,13 +36,13 @@ impl FunctionIRVerifier<'_> {
3636 self . verify_temp_def ( * dst)
3737 }
3838 Instr :: Binary { dst, lhs, rhs, .. } => {
39- self . verify_temp ( * lhs ) ;
40- self . verify_temp ( * rhs ) ;
39+ if let Value :: Temp ( id ) = lhs { self . verify_temp ( * id ) }
40+ if let Value :: Temp ( id ) = rhs { self . verify_temp ( * id ) } ;
4141 self . verify_temp_def ( * dst) ;
4242 }
4343 Instr :: Store { place, value } => {
4444 match value {
45- Value :: Temp ( * id) => self . verify_temp ( * id) ,
45+ Value :: Temp ( id) => self . verify_temp ( * id) ,
4646 _ => { }
4747 }
4848
@@ -54,7 +54,7 @@ impl FunctionIRVerifier<'_> {
5454 match place {
5555 Place :: Local ( id) => self . ir . locals . len ( ) > id. index ( ) as usize ,
5656 } ;
57- self . verify_temp_def ( dst)
57+ self . verify_temp_def ( * dst)
5858 }
5959 Instr :: Poision { dst } => {
6060 if let Some ( id) = dst {
You can’t perform that action at this time.
0 commit comments