Skip to content

Conversation

lucarlig
Copy link
Contributor

@lucarlig lucarlig commented Aug 5, 2025

added regression test using LLVM IR

https://rust.godbolt.org/z/7qcEKPf3e

Fixes #69174

@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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. labels Aug 5, 2025
}

// CHECK-LABEL: @clone_bar
// CHECK-NOT: icmp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you adjust this to specifically check this is just a load + ret? That should be fairly future proof and avoids any regressions if this is something that's more complex but not an icmp.

  %0 = load i16, ptr %b, align 1
  ret i16 %0

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Bad quality code for Clone on enum types
3 participants