-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
The panic branch of Some(x).unwrap() is not removed for some types #93011
Copy link
Copy link
Closed
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-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
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-heavyIssue: Problems and improvements with respect to binary size of generated code.Issue: Problems and improvements with respect to binary size of generated code.I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Demos: https://godbolt.org/z/TMh3Krfc5
The motivating example is:
It looks to me like the problem with
Vecis that specifically thenonnullattribute does not survive being wrapped in two structs that each contain a second member. If either ofRawVecorVecis missing ausizemember, the optimization works.There is a missed
NonZero*optimization in here that I found looking for types that fail to optimize. It's unclear to me if this was reported previously in #49572, or if whatever fixes the problem withVecwill also fix theNonZero*example.I think this is similar but not the same problem as seen in #71257