@@ -605,22 +605,17 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
605
605
}
606
606
607
607
fn and ( & mut self , a : RValue < ' gcc > , mut b : RValue < ' gcc > ) -> RValue < ' gcc > {
608
- // FIXME(antoyo): hack by putting the result in a variable to workaround this bug:
609
- // https://gcc.gnu.org/bugzilla//show_bug.cgi?id=95498
610
608
if a. get_type ( ) != b. get_type ( ) {
611
609
b = self . context . new_cast ( None , b, a. get_type ( ) ) ;
612
610
}
613
- let res = self . current_func ( ) . new_local ( None , b. get_type ( ) , "andResult" ) ;
614
- self . llbb ( ) . add_assignment ( None , res, a & b) ;
615
- res. to_rvalue ( )
611
+ a & b
616
612
}
617
613
618
- fn or ( & mut self , a : RValue < ' gcc > , b : RValue < ' gcc > ) -> RValue < ' gcc > {
619
- // FIXME(antoyo): hack by putting the result in a variable to workaround this bug:
620
- // https://gcc.gnu.org/bugzilla//show_bug.cgi?id=95498
621
- let res = self . current_func ( ) . new_local ( None , b. get_type ( ) , "orResult" ) ;
622
- self . llbb ( ) . add_assignment ( None , res, a | b) ;
623
- res. to_rvalue ( )
614
+ fn or ( & mut self , a : RValue < ' gcc > , mut b : RValue < ' gcc > ) -> RValue < ' gcc > {
615
+ if a. get_type ( ) != b. get_type ( ) {
616
+ b = self . context . new_cast ( None , b, a. get_type ( ) ) ;
617
+ }
618
+ a | b
624
619
}
625
620
626
621
fn xor ( & mut self , a : RValue < ' gcc > , b : RValue < ' gcc > ) -> RValue < ' gcc > {
0 commit comments