-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Bad codegen for comparing struct of two 16bit ints #140167
Copy link
Copy link
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationC-bugCategory: This is a bug.Category: This is a bug.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
View all comments
I tried this code:
I expected to see this happen:
aandbare loaded into a single register each and then the registers are compared against each other.Instead, this happened: https://rust.godbolt.org/z/8zaxKG8vx
For
-Copt-level=2:For
-Copt-level=3:Meta
rustc --version --verbose:Both 1.86 and nightly.