File tree 1 file changed +15
-9
lines changed
1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -1246,15 +1246,18 @@ macro_rules! iterator {
1246
1246
{
1247
1247
// The addition might panic on overflow
1248
1248
// Use the len of the slice to hint optimizer to remove result index bounds check.
1249
- let n = make_slice!( self . ptr, self . end) . len( ) ;
1249
+ let _n = make_slice!( self . ptr, self . end) . len( ) ;
1250
1250
self . try_fold( 0 , move |i, x| {
1251
1251
if predicate( x) { Err ( i) }
1252
1252
else { Ok ( i + 1 ) }
1253
1253
} ) . err( )
1254
- . map( |i| {
1255
- unsafe { assume( i < n) } ;
1256
- i
1257
- } )
1254
+ // // FIXME(#48116/#45964):
1255
+ // // This assume() causes misoptimization on LLVM 6.
1256
+ // // Commented out until it is fixed again.
1257
+ // .map(|i| {
1258
+ // unsafe { assume(i < n) };
1259
+ // i
1260
+ // })
1258
1261
}
1259
1262
1260
1263
#[ inline]
@@ -1271,10 +1274,13 @@ macro_rules! iterator {
1271
1274
if predicate( x) { Err ( i) }
1272
1275
else { Ok ( i) }
1273
1276
} ) . err( )
1274
- . map( |i| {
1275
- unsafe { assume( i < n) } ;
1276
- i
1277
- } )
1277
+ // // FIXME(#48116/#45964):
1278
+ // // This assume() causes misoptimization on LLVM 6.
1279
+ // // Commented out until it is fixed again.
1280
+ // .map(|i| {
1281
+ // unsafe { assume(i < n) };
1282
+ // i
1283
+ // })
1278
1284
}
1279
1285
}
1280
1286
You can’t perform that action at this time.
0 commit comments