@@ -1132,14 +1132,15 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
11321132 let is_eq_value =
11331133 if size == Size :: ZERO {
11341134 // No bytes means they're trivially equal
1135- fx. bcx. ins( ) . bconst ( types:: B1 , true )
1135+ fx. bcx. ins( ) . iconst ( types:: I8 , 1 )
11361136 } else if let Some ( clty) = type_by_size( size) {
11371137 // Can't use `trusted` for these loads; they could be unaligned.
11381138 let mut flags = MemFlags :: new( ) ;
11391139 flags. set_notrap( ) ;
11401140 let lhs_val = fx. bcx. ins( ) . load( clty, flags, lhs_ref, 0 ) ;
11411141 let rhs_val = fx. bcx. ins( ) . load( clty, flags, rhs_ref, 0 ) ;
1142- fx. bcx. ins( ) . icmp( IntCC :: Equal , lhs_val, rhs_val)
1142+ let eq = fx. bcx. ins( ) . icmp( IntCC :: Equal , lhs_val, rhs_val) ;
1143+ fx. bcx. ins( ) . bint( types:: I8 , eq)
11431144 } else {
11441145 // Just call `memcmp` (like slices do in core) when the
11451146 // size is too large or it's not a power-of-two.
@@ -1150,7 +1151,8 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
11501151 let returns = vec![ AbiParam :: new( types:: I32 ) ] ;
11511152 let args = & [ lhs_ref, rhs_ref, bytes_val] ;
11521153 let cmp = fx. lib_call( "memcmp" , params, returns, args) [ 0 ] ;
1153- fx. bcx. ins( ) . icmp_imm( IntCC :: Equal , cmp, 0 )
1154+ let eq = fx. bcx. ins( ) . icmp_imm( IntCC :: Equal , cmp, 0 ) ;
1155+ fx. bcx. ins( ) . bint( types:: I8 , eq)
11541156 } ;
11551157 ret. write_cvalue( fx, CValue :: by_val( is_eq_value, ret. layout( ) ) ) ;
11561158 } ;
0 commit comments