@@ -1132,14 +1132,15 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
1132
1132
let is_eq_value =
1133
1133
if size == Size :: ZERO {
1134
1134
// No bytes means they're trivially equal
1135
- fx. bcx. ins( ) . bconst ( types:: B1 , true )
1135
+ fx. bcx. ins( ) . iconst ( types:: I8 , 1 )
1136
1136
} else if let Some ( clty) = type_by_size( size) {
1137
1137
// Can't use `trusted` for these loads; they could be unaligned.
1138
1138
let mut flags = MemFlags :: new( ) ;
1139
1139
flags. set_notrap( ) ;
1140
1140
let lhs_val = fx. bcx. ins( ) . load( clty, flags, lhs_ref, 0 ) ;
1141
1141
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)
1143
1144
} else {
1144
1145
// Just call `memcmp` (like slices do in core) when the
1145
1146
// size is too large or it's not a power-of-two.
@@ -1150,7 +1151,8 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
1150
1151
let returns = vec![ AbiParam :: new( types:: I32 ) ] ;
1151
1152
let args = & [ lhs_ref, rhs_ref, bytes_val] ;
1152
1153
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)
1154
1156
} ;
1155
1157
ret. write_cvalue( fx, CValue :: by_val( is_eq_value, ret. layout( ) ) ) ;
1156
1158
} ;
0 commit comments