Skip to content

Conversation

crlf0710
Copy link
Member

Closes #99551 .

@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 10, 2022
@crlf0710
Copy link
Member Author

r? @bjorn3

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 10, 2022
@crlf0710 crlf0710 changed the title Add a codegen test for #99551 Fix LLVM IR type mismatch reported in #99551 Sep 10, 2022
@bjorn3
Copy link
Member

bjorn3 commented Sep 10, 2022

r=me once CI passes

@bjorn3
Copy link
Member

bjorn3 commented Sep 10, 2022

failures:

---- [ui] src/test/ui/traits/trait-upcasting/replace-vptr.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-upcasting/replace-vptr.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-upcasting/replace-vptr/a" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-upcasting/replace-vptr/auxiliary"
stdout: none
--- stderr -------------------------------
Use of instruction is not an instruction!
  %5 = load i8*, i8** %4, align 8, !invariant.load !4, !nonnull !4
LLVM ERROR: Broken module found, compilation aborted!
------------------------------------------


---- [ui] src/test/ui/traits/trait-upcasting/correct-supertrait-substitution.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-upcasting/correct-supertrait-substitution.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-upcasting/correct-supertrait-substitution/a" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-upcasting/correct-supertrait-substitution/auxiliary"
stdout: none
--- stderr -------------------------------
Use of instruction is not an instruction!
  %78 = load i8*, i8** %77, align 8, !invariant.load !4, !nonnull !4
LLVM ERROR: Broken module found, compilation aborted!
------------------------------------------


---- [ui] src/test/ui/traits/trait-upcasting/diamond.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 101
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/traits/trait-upcasting/diamond.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-upcasting/diamond/a" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/traits/trait-upcasting/diamond/auxiliary"
stdout: none
--- stderr -------------------------------
Use of instruction is not an instruction!
  %379 = load i8*, i8** getelementptr inbounds (i8*, i8** getelementptr inbounds (<{ i8*, [16 x i8], i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }>, <{ i8*, [16 x i8], i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }>* @10, i32 0, i32 0), i64 16), align 8, !invariant.load !4, !nonnull !4
LLVM ERROR: Broken module found, compilation aborted!
------------------------------------------



failures:
    [ui] src/test/ui/traits/trait-upcasting/correct-supertrait-substitution.rs
    [ui] src/test/ui/traits/trait-upcasting/diamond.rs
    [ui] src/test/ui/traits/trait-upcasting/replace-vptr.rs

@rust-log-analyzer

This comment was marked as outdated.

Seems this doesn't trigger error on LLVM 15, but let's fix it for better compatibility.
@bjorn3
Copy link
Member

bjorn3 commented Sep 10, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 10, 2022

📌 Commit 1cbbd2a has been approved by bjorn3

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 Sep 10, 2022
@bors
Copy link
Collaborator

bors commented Sep 10, 2022

⌛ Testing commit 1cbbd2a with merge 4a6ac3c...

@bors
Copy link
Collaborator

bors commented Sep 10, 2022

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 4a6ac3c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 10, 2022
@bors bors merged commit 4a6ac3c into rust-lang:master Sep 10, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 10, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4a6ac3c): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
1.3% [1.3%, 1.3%] 1
Regressions ❌
(secondary)
3.4% [3.1%, 3.9%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.3% [1.3%, 1.3%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean1 range count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
-4.3% [-4.3%, -4.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -4.3% [-4.3%, -4.3%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

@rustbot rustbot added the perf-regression Performance regression. label Sep 11, 2022
@crlf0710 crlf0710 added the F-trait_upcasting `#![feature(trait_upcasting)]` label Sep 11, 2022
@crlf0710 crlf0710 deleted the test_for_99551 branch September 11, 2022 02:45
@nnethercote
Copy link
Contributor

cranelift-codegen and keccak have been noisy lately.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-trait_upcasting `#![feature(trait_upcasting)]` merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

llvm failed to generate code when trait_upcasting feature used
9 participants