File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -774,14 +774,16 @@ pub fn trans_int_binop<'a, 'tcx: 'a>(
774
774
}
775
775
776
776
if lhs. layout ( ) . ty == fx. tcx . types . u128 || lhs. layout ( ) . ty == fx. tcx . types . i128 {
777
- return match ( bin_op, signed) {
778
- _ => {
779
- let layout = fx. layout_of ( out_ty) ;
780
- let a = fx. bcx . ins ( ) . iconst ( types:: I64 , 42 ) ;
781
- let b = fx. bcx . ins ( ) . iconst ( types:: I64 , 0 ) ;
782
- let val = fx. bcx . ins ( ) . iconcat ( a, b) ;
783
- CValue :: by_val ( val, layout)
784
- }
777
+ if out_ty == fx. tcx . types . bool {
778
+ let layout = fx. layout_of ( fx. tcx . types . bool ) ;
779
+ let val = fx. bcx . ins ( ) . iconst ( types:: I8 , 0 ) ;
780
+ return CValue :: by_val ( val, layout) ;
781
+ } else {
782
+ let layout = fx. layout_of ( out_ty) ;
783
+ let a = fx. bcx . ins ( ) . iconst ( types:: I64 , 42 ) ;
784
+ let b = fx. bcx . ins ( ) . iconst ( types:: I64 , 0 ) ;
785
+ let val = fx. bcx . ins ( ) . iconcat ( a, b) ;
786
+ return CValue :: by_val ( val, layout) ;
785
787
}
786
788
}
787
789
You can’t perform that action at this time.
0 commit comments