Skip to content

Conversation

@workingjubilee
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

lolbinarycat and others added 12 commits October 25, 2024 12:19
…n-func, r=notriddle

allow type-based search on foreign functions

fixes rust-lang#131804

preferably will be merged after rust-lang#129708, but that may take a while to be approved due to being a new feature, whereas this is definitely a bug, and should be fixed.
…ieyouxu

Add a Few Codegen Tests

Closes rust-lang#86109
Closes rust-lang#64219

Those issues somehow got fixed over time.

So, this PR adds a couple of codegen tests to ensure we don't regress in the future.
…=notriddle

Fix code HTML items making big blocks if too long

Encountered this bug randomly where `code` item in docblocks would look like this:

![Screenshot from 2024-10-26 15-44-46](https://github.com/user-attachments/assets/a9c1df9d-5007-49eb-a7dd-a2c381b2511e)

With this fix it looks like this:

![image](https://github.com/user-attachments/assets/ea918595-5434-4781-b68c-6abd38689365)

r? `@notriddle`
expand: Stop using artificial `ast::Item` for macros loaded from metadata

You don't need a full `Item` for that, and not using a piece of AST helps with rust-lang#131808.
…-mislinked, r=tgross35

docs: Correctly link riscv32e from platform-support.md

Correctly link the riscv32e platform support page.

Just a mistake during the iteration of rust-lang#130555 that was missed in review. Presumably the rv32e-none and rv32i-none pages eventually should get merged, but this is a relatively recent addition to the ISA definition so it is not clear the current RISCV Embedded group has the expertise on-hand... nor did it have their consent.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Oct 27, 2024
@workingjubilee
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Oct 27, 2024

📌 Commit d81a7e3 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 27, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 27, 2024
…kingjubilee

Rollup of 5 pull requests

Successful merges:

 - rust-lang#132123 (allow type-based search on foreign functions)
 - rust-lang#132170 (Add a Few Codegen Tests)
 - rust-lang#132183 (Fix code HTML items making big blocks if too long)
 - rust-lang#132192 (expand: Stop using artificial `ast::Item` for macros loaded from metadata)
 - rust-lang#132205 (docs: Correctly link riscv32e from platform-support.md)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Oct 27, 2024

⌛ Testing commit d81a7e3 with merge 1c365b9...

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
failures:

---- [codegen] tests/codegen/issues/issue-86109-eliminate-div-by-zero-check.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/ci-llvm/bin/FileCheck" "--input-file" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/codegen/issues/issue-86109-eliminate-div-by-zero-check/issue-86109-eliminate-div-by-zero-check.ll" "/Users/runner/work/rust/rust/tests/codegen/issues/issue-86109-eliminate-div-by-zero-check.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/Users/runner/work/rust/rust/tests/codegen/issues/issue-86109-eliminate-div-by-zero-check.rs:15:16: error: CHECK-NOT: excluded string found in input
/Users/runner/work/rust/rust/tests/codegen/issues/issue-86109-eliminate-div-by-zero-check.rs:15:16: error: CHECK-NOT: excluded string found in input
 // CHECK-NOT: call
/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/codegen/issues/issue-86109-eliminate-div-by-zero-check/issue-86109-eliminate-div-by-zero-check.ll:64:13: note: found here
/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/codegen/issues/issue-86109-eliminate-div-by-zero-check/issue-86109-eliminate-div-by-zero-check.ll:64:13: note: found here
 %21 = tail call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> %bin.rdx14)

Input file: /Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/codegen/issues/issue-86109-eliminate-div-by-zero-check/issue-86109-eliminate-div-by-zero-check.ll
Check file: /Users/runner/work/rust/rust/tests/codegen/issues/issue-86109-eliminate-div-by-zero-check.rs


-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
        1: ; ModuleID = 'issue_86109_eliminate_div_by_zero_check.d0160470595e1abe-cgu.0' 
        2: source_filename = "issue_86109_eliminate_div_by_zero_check.d0160470595e1abe-cgu.0" 
        3: target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128-Fn32" 
        4: target triple = "arm64-apple-macosx11.0.0" 
        5:  
        6: ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable 
        7: define noundef i16 @foo(i16 noundef %start1) unnamed_addr #0 { 
        8: start: 
        9:  %0 = add i16 %start1, -1 
       10:  %or.cond = icmp ult i16 %0, 9999 
       11:  br i1 %or.cond, label %bb9.preheader, label %bb8 
       12:  
       13: bb9.preheader: ; preds = %start 
       14:  %1 = sub nsw i16 9999, %start1 
       15:  %2 = zext i16 %1 to i32 
       16:  %3 = add nuw nsw i32 %2, 1 
       17:  %min.iters.check = icmp ult i16 %1, 31 
       18:  br i1 %min.iters.check, label %bb9.preheader15, label %vector.ph 
       19:  
       20: vector.ph: ; preds = %bb9.preheader 
       21:  %n.vec = and i32 %3, 131040 
       22:  %.cast = trunc i32 %n.vec to i16 
       23:  %ind.end = add i16 %.cast, %start1 
       24:  %.splatinsert = insertelement <8 x i16> poison, i16 %start1, i64 0 
       25:  %.splat = shufflevector <8 x i16> %.splatinsert, <8 x i16> poison, <8 x i32> zeroinitializer 
       26:  %induction = add nuw nsw <8 x i16> %.splat, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7> 
       27:  br label %vector.body 
       28:  
       29: vector.body: ; preds = %vector.body, %vector.ph 
       30:  %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] 
       31:  %vec.phi = phi <8 x i16> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ] 
       32:  %vec.phi7 = phi <8 x i16> [ zeroinitializer, %vector.ph ], [ %17, %vector.body ] 
       33:  %vec.phi8 = phi <8 x i16> [ zeroinitializer, %vector.ph ], [ %18, %vector.body ] 
       34:  %vec.phi9 = phi <8 x i16> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ] 
       35:  %vec.ind = phi <8 x i16> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ] 
       36:  %step.add = add <8 x i16> %vec.ind, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8> 
       37:  %step.add10 = add <8 x i16> %vec.ind, <i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16, i16 16> 
       38:  %step.add11 = add <8 x i16> %vec.ind, <i16 24, i16 24, i16 24, i16 24, i16 24, i16 24, i16 24, i16 24> 
       39:  %4 = urem <8 x i16> <i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752>, %vec.ind 
       40:  %5 = urem <8 x i16> <i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752>, %step.add 
       41:  %6 = urem <8 x i16> <i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752>, %step.add10 
       42:  %7 = urem <8 x i16> <i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752, i16 752>, %step.add11 
       43:  %8 = icmp ne <8 x i16> %4, zeroinitializer 
       44:  %9 = icmp ne <8 x i16> %5, zeroinitializer 
       45:  %10 = icmp ne <8 x i16> %6, zeroinitializer 
       46:  %11 = icmp ne <8 x i16> %7, zeroinitializer 
       47:  %12 = zext <8 x i1> %8 to <8 x i16> 
       48:  %13 = zext <8 x i1> %9 to <8 x i16> 
       49:  %14 = zext <8 x i1> %10 to <8 x i16> 
       50:  %15 = zext <8 x i1> %11 to <8 x i16> 
       51:  %16 = add <8 x i16> %vec.phi, %12 
       52:  %17 = add <8 x i16> %vec.phi7, %13 
       53:  %18 = add <8 x i16> %vec.phi8, %14 
       54:  %19 = add <8 x i16> %vec.phi9, %15 
       55:  %index.next = add nuw i32 %index, 32 
       56:  %vec.ind.next = add <8 x i16> %vec.ind, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32> 
       57:  %20 = icmp eq i32 %index.next, %n.vec 
       58:  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !2 
       59:  
       60: middle.block: ; preds = %vector.body 
       61:  %bin.rdx = add <8 x i16> %17, %16 
       62:  %bin.rdx13 = add <8 x i16> %18, %bin.rdx 
       63:  %bin.rdx14 = add <8 x i16> %19, %bin.rdx13 
       64:  %21 = tail call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> %bin.rdx14) 
not:15                 !~~~                                                          error: no match expected
       65:  %cmp.n = icmp eq i32 %3, %n.vec 
       66:  br i1 %cmp.n, label %bb8, label %bb9.preheader15 
       67:  
       68: bb9.preheader15: ; preds = %middle.block, %bb9.preheader 
       69:  %count.sroa.0.06.ph = phi i16 [ 0, %bb9.preheader ], [ %21, %middle.block ] 
       70:  %iter.sroa.0.05.ph = phi i16 [ %start1, %bb9.preheader ], [ %ind.end, %middle.block ] 
       71:  br label %bb9 
       72:  
       73: bb9: ; preds = %bb9.preheader15, %bb9 
       74:  %count.sroa.0.06 = phi i16 [ %count.sroa.0.1, %bb9 ], [ %count.sroa.0.06.ph, %bb9.preheader15 ] 
       75:  %iter.sroa.0.05 = phi i16 [ %_11.0.i, %bb9 ], [ %iter.sroa.0.05.ph, %bb9.preheader15 ] 
       76:  %_11.0.i = add nuw nsw i16 %iter.sroa.0.05, 1 
       77:  %_6 = urem i16 752, %iter.sroa.0.05 
       78:  %22 = icmp ne i16 %_6, 0 
       79:  %23 = zext i1 %22 to i16 
       80:  %count.sroa.0.1 = add i16 %count.sroa.0.06, %23 
       81:  %_8 = icmp slt i16 %iter.sroa.0.05, 9999 
       82:  br i1 %_8, label %bb9, label %bb8, !llvm.loop !5 
       83:  
       84: bb8: ; preds = %bb9, %middle.block, %start 
       85:  %_0.sroa.0.0 = phi i16 [ 0, %start ], [ %21, %middle.block ], [ %count.sroa.0.1, %bb9 ] 
       86:  ret i16 %_0.sroa.0.0 
       87: } 
       88:  
       89: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) 
       90: declare i16 @llvm.vector.reduce.add.v8i16(<8 x i16>) #1 
       91:  
       92: attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="apple-m1" } 
       93: attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 
       94:  
       95: !llvm.module.flags = !{!0} 
       96: !llvm.ident = !{!1} 
       97:  
       98: !0 = !{i32 8, !"PIC Level", i32 2} 
       99: !1 = !{!"rustc version 1.84.0-nightly (1c365b9d6 2024-10-27)"} 
      100: !2 = distinct !{!2, !3, !4} 
      101: !3 = !{!"llvm.loop.isvectorized", i32 1} 
      102: !4 = !{!"llvm.loop.unroll.runtime.disable"} 
      103: !5 = distinct !{!5, !4, !3} 
------------------------------------------



@bors
Copy link
Collaborator

bors commented Oct 27, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 27, 2024
@workingjubilee workingjubilee deleted the rollup-l9xd4jw branch October 27, 2024 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants