[Experiment] Do not emit noalias for some functions including .as_mut_ptr() by HKalbasi · Pull Request #146823 · rust-lang/rust (original) (raw)
---- [codegen] tests/codegen-llvm/function-arguments.rs stdout ----
------FileCheck stdout------------------------------
------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/function-arguments.rs:248:11: error: CHECK: expected string not found in input
// CHECK: @trait_raw(ptr noundef %_1.0, {{.+}} noalias noundef readonly align {{.*}} dereferenceable({{.*}}) %_1.1)
^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/function-arguments/function-arguments.ll:519:73: note: scanning from here
define void @option_trait_borrow_mut(ptr noundef align 1 %x.0, ptr %x.1) unnamed_addr #1 {
^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/function-arguments/function-arguments.ll:525:1: note: possible intended match here
define void @trait_raw(ptr noundef %_1.0, ptr noundef readonly align 8 dereferenceable(32) %_1.1) unnamed_addr #1 {
^
Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/function-arguments/function-arguments.ll
Check file: /checkout/tests/codegen-llvm/function-arguments.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
419: }
420:
421: ; Function Attrs: uwtable
422: define void @raw_struct(ptr noundef %_1) unnamed_addr #1 {
423: start:
424: ret void
425: }
426:
427: ; Function Attrs: uwtable
428: define void @raw_option_nonnull_struct(ptr noundef %_1) unnamed_addr #1 {
429: start:
430: ret void
431: }
432:
433: ; Function Attrs: uwtable
434: define noundef nonnull align 4 ptr @_box(ptr noalias noundef nonnull align 4 %x) unnamed_addr #1 {
435: start:
436: ret ptr %x
437: }
438:
439: ; Function Attrs: uwtable
440: define void @_box_custom(ptr noundef nonnull align 4 %x.0, ptr noalias noundef nonnull readonly align 1 %x.1) unnamed_addr #1 {
441: start:
442: %_2 = alloca [16 x i8], align 8
443: call void @llvm.lifetime.start.p0(i64 16, ptr %_2)
444: store ptr %x.0, ptr %_2, align 8
445: %0 = getelementptr inbounds i8, ptr %_2, i64 8
446: store ptr %x.1, ptr %0, align 8
447: ; call core::ptr::drop_in_place<alloc::boxed::Box<i32,&alloc::alloc::Global>>
448: call void @"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$i32$C$$RF$alloc..alloc..Global$GT$$GT$17h420bfac315dcd652E"(ptr noalias noundef align 8 dereferenceable(16) %_2)
449: call void @llvm.lifetime.end.p0(i64 16, ptr %_2)
450: ret void
451: }
452:
453: ; Function Attrs: uwtable
454: define noundef nonnull align 4 ptr @notunpin_box(ptr noundef nonnull align 4 %x) unnamed_addr #1 {
455: start:
456: ret ptr %x
457: }
458:
459: ; Function Attrs: uwtable
460: define void @struct_return(ptr dead_on_unwind noalias noundef writable sret([32 x i8]) align 4 dereferenceable(32) %_0) unnamed_addr #1 {
461: start:
462: %_1 = alloca [32 x i8], align 4
463: call void @llvm.lifetime.start.p0(i64 32, ptr %_1)
464: call void @llvm.memset.p0.i64(ptr align 4 %_1, i8 0, i64 32, i1 false)
465: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_0, ptr align 4 %_1, i64 32, i1 false)
466: call void @llvm.lifetime.end.p0(i64 32, ptr %_1)
467: ret void
468: }
469:
470: ; Function Attrs: uwtable
471: define void @helper(i64 noundef %_1) unnamed_addr #1 {
472: start:
473: ret void
474: }
475:
476: ; Function Attrs: uwtable
477: define void @slice(ptr noalias noundef nonnull readonly align 1 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
478: start:
479: ret void
480: }
481:
482: ; Function Attrs: uwtable
483: define void @mutable_slice(ptr noalias noundef nonnull align 1 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
484: start:
485: ret void
486: }
487:
488: ; Function Attrs: uwtable
489: define void @unsafe_slice(ptr noundef nonnull align 2 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
490: start:
491: ret void
492: }
493:
494: ; Function Attrs: uwtable
495: define void @raw_slice(ptr noundef %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
496: start:
497: ret void
498: }
499:
500: ; Function Attrs: uwtable
501: define void @str(ptr noalias noundef nonnull readonly align 1 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
502: start:
503: ret void
504: }
505:
506: ; Function Attrs: uwtable
507: define void @trait_borrow(ptr noundef nonnull align 1 %_1.0, ptr noalias noundef readonly align 8 dereferenceable(32) %_1.1) unnamed_addr #1 {
508: start:
509: ret void
510: }
511:
512: ; Function Attrs: uwtable
513: define void @option_trait_borrow(ptr noundef align 1 %x.0, ptr %x.1) unnamed_addr #1 {
514: start:
515: ret void
516: }
517:
518: ; Function Attrs: uwtable
519: define void @option_trait_borrow_mut(ptr noundef align 1 %x.0, ptr %x.1) unnamed_addr #1 {
check:248'0 X~~~~~~~~~~~~~~~~~~ error: no match found
520: start:
check:248'0 ~~~~~~~
521: ret void
check:248'0 ~~~~~~~~~~
522: }
check:248'0 ~~
523:
check:248'0 ~
524: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
525: define void @trait_raw(ptr noundef %_1.0, ptr noundef readonly align 8 dereferenceable(32) %_1.1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:248'1 ? possible intended match
526: start:
check:248'0 ~~~~~~~
527: ret void
check:248'0 ~~~~~~~~~~
528: }
check:248'0 ~~
529:
check:248'0 ~
530: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
531: define void @trait_box(ptr noalias noundef nonnull align 1 %0, ptr noalias noundef readonly align 8 dereferenceable(32) %1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
532: start:
check:248'0 ~~~~~~~
533: %_1 = alloca [16 x i8], align 8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
534: store ptr %0, ptr %_1, align 8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
535: %2 = getelementptr inbounds i8, ptr %_1, i64 8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
536: store ptr %1, ptr %2, align 8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
537: ; call core::ptr::drop_in_place<alloc::boxed::Box<dyn core::ops::drop::Drop+core:📑:Unpin>>
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
538: call void @"_ZN4core3ptr99drop_in_place$LT$alloc..boxed..Box$LT$dyn$u20$core..ops..drop..Drop$u2b$core..marker..Unpin$GT$$GT$17h04557acee4a8c00fE"(ptr noalias noundef align 8 dereferenceable(16) %_1)
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
539: ret void
check:248'0 ~~~~~~~~~~
540: }
check:248'0 ~~
541:
check:248'0 ~
542: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
543: define { ptr, ptr } @trait_option(ptr noalias noundef align 1 %x.0, ptr %x.1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
544: start:
check:248'0 ~~~~~~~
545: %0 = insertvalue { ptr, ptr } poison, ptr %x.0, 0
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
546: %1 = insertvalue { ptr, ptr } %0, ptr %x.1, 1
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
547: ret { ptr, ptr } %1
check:248'0 ~~~~~~~~~~~~~~~~~~~~~
548: }
check:248'0 ~~
549:
check:248'0 ~
550: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
551: define { ptr, i64 } @return_slice(ptr noalias noundef nonnull readonly align 2 %x.0, i64 noundef %x.1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
552: start:
check:248'0 ~~~~~~~
553: %0 = insertvalue { ptr, i64 } poison, ptr %x.0, 0
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
554: %1 = insertvalue { ptr, i64 } %0, i64 %x.1, 1
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
555: ret { ptr, i64 } %1
check:248'0 ~~~~~~~~~~~~~~~~~~~~~
556: }
check:248'0 ~~
557:
check:248'0 ~
558: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
559: define { i16, i16 } @enum_id_1(i16 noundef range(i16 0, 3) %x.0, i16 %x.1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
560: start:
check:248'0 ~~~~~~~
561: %0 = insertvalue { i16, i16 } poison, i16 %x.0, 0
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
562: %1 = insertvalue { i16, i16 } %0, i16 %x.1, 1
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
563: ret { i16, i16 } %1
check:248'0 ~~~~~~~~~~~~~~~~~~~~~
564: }
check:248'0 ~~
565:
check:248'0 ~
566: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
567: define { i1, i8 } @enum_id_2(i1 noundef zeroext %x.0, i8 %x.1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
568: start:
check:248'0 ~~~~~~~
569: %0 = insertvalue { i1, i8 } poison, i1 %x.0, 0
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
570: %1 = insertvalue { i1, i8 } %0, i8 %x.1, 1
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
571: ret { i1, i8 } %1
check:248'0 ~~~~~~~~~~~~~~~~~~~
572: }
check:248'0 ~~
573:
check:248'0 ~
574: ; Function Attrs: nounwind uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
575: declare noundef range(i32 0, 10) i32 @rust_eh_personality(i32 noundef, i32 noundef, i64 noundef, ptr noundef, ptr noundef) unnamed_addr #2
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
576:
check:248'0 ~
577: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
578: declare void @llvm.assume(i1 noundef) #3
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
579:
check:248'0 ~
580: ; core::panicking::panic_in_cleanup
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
581: ; Function Attrs: cold minsize noinline noreturn nounwind optsize uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
582: declare void @_ZN4core9panicking16panic_in_cleanup17h1a7eb7d2f77ca3c4E() unnamed_addr #4
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
583:
check:248'0 ~
584: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
585: declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #5
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
586:
check:248'0 ~
587: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
588: declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #5
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
589:
check:248'0 ~
590: ; __rustc::__rust_dealloc
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
591: ; Function Attrs: nounwind allockind("free") uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
592: declare void @_RNvCscb6FVMNHe8V_7___rustc14___rust_dealloc(ptr allocptr noundef, i64 noundef, i64 noundef) unnamed_addr #6
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
593:
check:248'0 ~
594: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
595: declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
596:
check:248'0 ~
597: ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
598: declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
599:
check:248'0 ~
600: attributes #0 = { inlinehint uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
601: attributes #1 = { uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
602: attributes #2 = { nounwind uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
603: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
604: attributes #4 = { cold minsize noinline noreturn nounwind optsize uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
605: attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
606: attributes #6 = { nounwind allockind("free") uwtable "alloc-family"="__rust_alloc" "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
607: attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
608: attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
609: attributes #9 = { cold }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
610: attributes #10 = { cold noreturn nounwind }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
611: attributes #11 = { nounwind }
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
612:
check:248'0 ~
613: !llvm.module.flags = !{!0}
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
614: !llvm.ident = !{!1}
check:248'0 ~~~~~~~~~~~~~~~~~~~~
615:
check:248'0 ~
616: !0 = !{i32 8, !"PIC Level", i32 2}
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
617: !1 = !{!"rustc version 1.92.0-nightly (73a9cd834 2025-09-24)"}
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
618: !2 = !{}
check:248'0 ~~~~~~~~~
619: !3 = !{i64 1}
check:248'0 ~~~~~~~~~~~~~~
620: !4 = !{i64 8}
check:248'0 ~~~~~~~~~~~~~~
621: !5 = !{i64 1, i64 -9223372036854775807}
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
622: !6 = !{i64 0, i64 -9223372036854775808}
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
623: !7 = !{i64 1, i64 0}
check:248'0 ~~~~~~~~~~~~~~~~~~~~~
>>>>>>
------------------------------------------
error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-20/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/function-arguments/function-arguments.ll" "/checkout/tests/codegen-llvm/function-arguments.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/function-arguments.rs:248:11: error: CHECK: expected string not found in input
// CHECK: @trait_raw(ptr noundef %_1.0, {{.+}} noalias noundef readonly align {{.*}} dereferenceable({{.*}}) %_1.1)
^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/function-arguments/function-arguments.ll:519:73: note: scanning from here
define void @option_trait_borrow_mut(ptr noundef align 1 %x.0, ptr %x.1) unnamed_addr #1 {
^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/function-arguments/function-arguments.ll:525:1: note: possible intended match here
define void @trait_raw(ptr noundef %_1.0, ptr noundef readonly align 8 dereferenceable(32) %_1.1) unnamed_addr #1 {
^
Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/function-arguments/function-arguments.ll
Check file: /checkout/tests/codegen-llvm/function-arguments.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
419: }
420:
421: ; Function Attrs: uwtable
422: define void @raw_struct(ptr noundef %_1) unnamed_addr #1 {
423: start:
424: ret void
425: }
426:
427: ; Function Attrs: uwtable
428: define void @raw_option_nonnull_struct(ptr noundef %_1) unnamed_addr #1 {
429: start:
430: ret void
431: }
432:
433: ; Function Attrs: uwtable
434: define noundef nonnull align 4 ptr @_box(ptr noalias noundef nonnull align 4 %x) unnamed_addr #1 {
435: start:
436: ret ptr %x
437: }
438:
439: ; Function Attrs: uwtable
440: define void @_box_custom(ptr noundef nonnull align 4 %x.0, ptr noalias noundef nonnull readonly align 1 %x.1) unnamed_addr #1 {
441: start:
442: %_2 = alloca [16 x i8], align 8
443: call void @llvm.lifetime.start.p0(i64 16, ptr %_2)
444: store ptr %x.0, ptr %_2, align 8
445: %0 = getelementptr inbounds i8, ptr %_2, i64 8
446: store ptr %x.1, ptr %0, align 8
447: ; call core::ptr::drop_in_place<alloc::boxed::Box<i32,&alloc::alloc::Global>>
448: call void @"_ZN4core3ptr76drop_in_place$LT$alloc..boxed..Box$LT$i32$C$$RF$alloc..alloc..Global$GT$$GT$17h420bfac315dcd652E"(ptr noalias noundef align 8 dereferenceable(16) %_2)
449: call void @llvm.lifetime.end.p0(i64 16, ptr %_2)
450: ret void
451: }
452:
453: ; Function Attrs: uwtable
454: define noundef nonnull align 4 ptr @notunpin_box(ptr noundef nonnull align 4 %x) unnamed_addr #1 {
455: start:
456: ret ptr %x
457: }
458:
459: ; Function Attrs: uwtable
460: define void @struct_return(ptr dead_on_unwind noalias noundef writable sret([32 x i8]) align 4 dereferenceable(32) %_0) unnamed_addr #1 {
461: start:
462: %_1 = alloca [32 x i8], align 4
463: call void @llvm.lifetime.start.p0(i64 32, ptr %_1)
464: call void @llvm.memset.p0.i64(ptr align 4 %_1, i8 0, i64 32, i1 false)
465: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_0, ptr align 4 %_1, i64 32, i1 false)
466: call void @llvm.lifetime.end.p0(i64 32, ptr %_1)
467: ret void
468: }
469:
470: ; Function Attrs: uwtable
471: define void @helper(i64 noundef %_1) unnamed_addr #1 {
472: start:
473: ret void
474: }
475:
476: ; Function Attrs: uwtable
477: define void @slice(ptr noalias noundef nonnull readonly align 1 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
478: start:
479: ret void
480: }
481:
482: ; Function Attrs: uwtable
483: define void @mutable_slice(ptr noalias noundef nonnull align 1 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
484: start:
485: ret void
486: }
487:
488: ; Function Attrs: uwtable
489: define void @unsafe_slice(ptr noundef nonnull align 2 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
490: start:
491: ret void
492: }
493:
494: ; Function Attrs: uwtable
495: define void @raw_slice(ptr noundef %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
496: start:
497: ret void
498: }
499:
500: ; Function Attrs: uwtable
501: define void @str(ptr noalias noundef nonnull readonly align 1 %_1.0, i64 noundef %_1.1) unnamed_addr #1 {
502: start:
503: ret void
504: }
505:
506: ; Function Attrs: uwtable
507: define void @trait_borrow(ptr noundef nonnull align 1 %_1.0, ptr noalias noundef readonly align 8 dereferenceable(32) %_1.1) unnamed_addr #1 {
508: start:
509: ret void
510: }
511:
512: ; Function Attrs: uwtable
513: define void @option_trait_borrow(ptr noundef align 1 %x.0, ptr %x.1) unnamed_addr #1 {
514: start:
515: ret void
516: }
517:
518: ; Function Attrs: uwtable
519: define void @option_trait_borrow_mut(ptr noundef align 1 %x.0, ptr %x.1) unnamed_addr #1 {
check:248'0 X~~~~~~~~~~~~~~~~~~ error: no match found
520: start:
check:248'0 ~~~~~~~
521: ret void
check:248'0 ~~~~~~~~~~
522: }
check:248'0 ~~
523:
check:248'0 ~
524: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
525: define void @trait_raw(ptr noundef %_1.0, ptr noundef readonly align 8 dereferenceable(32) %_1.1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:248'1 ? possible intended match
526: start:
check:248'0 ~~~~~~~
527: ret void
check:248'0 ~~~~~~~~~~
528: }
check:248'0 ~~
529:
check:248'0 ~
530: ; Function Attrs: uwtable
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
531: define void @trait_box(ptr noalias noundef nonnull align 1 %0, ptr noalias noundef readonly align 8 dereferenceable(32) %1) unnamed_addr #1 {
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
532: start:
check:248'0 ~~~~~~~
533: %_1 = alloca [16 x i8], align 8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
534: store ptr %0, ptr %_1, align 8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
535: %2 = getelementptr inbounds i8, ptr %_1, i64 8
check:248'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~