@@ -322,7 +322,8 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
322
322
_ => bug ! ( ) ,
323
323
} ;
324
324
self . call (
325
- self . type_i1 ( ) , None ,
325
+ self . type_i1 ( ) ,
326
+ None ,
326
327
None ,
327
328
expect,
328
329
& [
@@ -367,16 +368,23 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
367
368
sym:: ctlz | sym:: cttz => {
368
369
let y = self . const_bool ( false ) ;
369
370
let llfn = self . get_intrinsic ( & format ! ( "llvm.{}.i{}" , name, width) ) ;
370
- self . call ( self . type_i1 ( ) , None , llfn, & [ args[ 0 ] . immediate ( ) , y] , None )
371
+ self . call ( self . type_i1 ( ) , None , None , llfn, & [ args[ 0 ] . immediate ( ) , y] , None )
371
372
}
372
373
sym:: ctlz_nonzero | sym:: cttz_nonzero => {
373
374
let y = self . const_bool ( true ) ;
374
375
let llvm_name = & format ! ( "llvm.{}.i{}" , & name_str[ ..4 ] , width) ;
375
376
let llfn = self . get_intrinsic ( llvm_name) ;
376
- self . call ( self . type_i1 ( ) , None , None , llfn, & [ args[ 0 ] . immediate ( ) , y] , None )
377
+ self . call (
378
+ self . type_i1 ( ) ,
379
+ None ,
380
+ None ,
381
+ llfn,
382
+ & [ args[ 0 ] . immediate ( ) , y] ,
383
+ None ,
384
+ )
377
385
}
378
386
sym:: ctpop => self . call (
379
- self . type_i1 ( ) ,
387
+ self . type_i1 ( ) , None ,
380
388
None ,
381
389
self . get_intrinsic ( & format ! ( "llvm.ctpop.i{}" , width) ) ,
382
390
& [ args[ 0 ] . immediate ( ) ] ,
@@ -387,7 +395,7 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
387
395
args[ 0 ] . immediate ( ) // byte swap a u8/i8 is just a no-op
388
396
} else {
389
397
self . call (
390
- self . type_i1 ( ) ,
398
+ self . type_i1 ( ) , None ,
391
399
None ,
392
400
self . get_intrinsic ( & format ! ( "llvm.bswap.i{}" , width) ) ,
393
401
& [ args[ 0 ] . immediate ( ) ] ,
@@ -396,7 +404,8 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
396
404
}
397
405
}
398
406
sym:: bitreverse => self . call (
399
- self . type_i1 ( ) , None ,
407
+ self . type_i1 ( ) ,
408
+ None ,
400
409
None ,
401
410
self . get_intrinsic ( & format ! ( "llvm.bitreverse.i{}" , width) ) ,
402
411
& [ args[ 0 ] . immediate ( ) ] ,
@@ -410,7 +419,7 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
410
419
let llvm_name =
411
420
& format ! ( "llvm.fsh{}.i{}" , if is_left { 'l' } else { 'r' } , width) ;
412
421
let llfn = self . get_intrinsic ( llvm_name) ;
413
- self . call ( self . type_i1 ( ) , None , llfn, & [ val, val, raw_shift] , None )
422
+ self . call ( self . type_i1 ( ) , None , None , llfn, & [ val, val, raw_shift] , None )
414
423
}
415
424
sym:: saturating_add | sym:: saturating_sub => {
416
425
let is_add = name == sym:: saturating_add;
@@ -463,7 +472,7 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
463
472
let b_ptr = self . bitcast ( b, i8p_ty) ;
464
473
let n = self . const_usize ( layout. size ( ) . bytes ( ) ) ;
465
474
let intrinsic = self . get_intrinsic ( "memcmp" ) ;
466
- let cmp = self . call ( self . type_i1 ( ) , None , intrinsic, & [ a_ptr, b_ptr, n] , None ) ;
475
+ let cmp = self . call ( self . type_i1 ( ) , None , None , intrinsic, & [ a_ptr, b_ptr, n] , None ) ;
467
476
self . icmp ( IntPredicate :: IntEQ , cmp, self . const_i32 ( 0 ) )
468
477
}
469
478
}
@@ -488,7 +497,7 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
488
497
fn abort ( & mut self ) {
489
498
trace ! ( "Generate abort call" ) ;
490
499
let fnname = self . get_intrinsic ( "llvm.trap" ) ;
491
- self . call ( self . type_i1 ( ) , None , fnname, & [ ] , None ) ;
500
+ self . call ( self . type_i1 ( ) , None , None , fnname, & [ ] , None ) ;
492
501
}
493
502
494
503
fn assume ( & mut self , val : Self :: Value ) {
@@ -501,7 +510,7 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
501
510
trace ! ( "Generate expect call with `{:?}`, {}" , cond, expected) ;
502
511
let expect = self . get_intrinsic ( "llvm.expect.i1" ) ;
503
512
self . call (
504
- self . type_i1 ( ) ,
513
+ self . type_i1 ( ) , None ,
505
514
None ,
506
515
expect,
507
516
& [ cond, self . const_bool ( expected) ] ,
@@ -526,12 +535,12 @@ impl<'a, 'll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
526
535
fn va_start ( & mut self , va_list : & ' ll Value ) -> Self :: Value {
527
536
trace ! ( "Generate va_start `{:?}`" , va_list) ;
528
537
let intrinsic = self . cx ( ) . get_intrinsic ( "llvm.va_start" ) ;
529
- self . call ( self . type_i1 ( ) , None , intrinsic, & [ va_list] , None )
538
+ self . call ( self . type_i1 ( ) , None , None , intrinsic, & [ va_list] , None )
530
539
}
531
540
532
541
fn va_end ( & mut self , va_list : & ' ll Value ) -> Self :: Value {
533
542
trace ! ( "Generate va_end call `{:?}`" , va_list) ;
534
543
let intrinsic = self . cx ( ) . get_intrinsic ( "llvm.va_end" ) ;
535
- self . call ( self . type_i1 ( ) , None , intrinsic, & [ va_list] , None )
544
+ self . call ( self . type_i1 ( ) , None , None , intrinsic, & [ va_list] , None )
536
545
}
537
546
}
0 commit comments