Skip to content

Commit 71b84cf

Browse files
committed
[WIP]
1 parent 9a617f4 commit 71b84cf

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/base.rs

+10-8
Original file line numberDiff line numberDiff line change
@@ -774,14 +774,16 @@ pub fn trans_int_binop<'a, 'tcx: 'a>(
774774
}
775775

776776
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);
785787
}
786788
}
787789

0 commit comments

Comments
 (0)