Open
Description
Repro: https://play.rust-lang.org/?gist=0981601dda9c5800e353e31b22682bb5&version=nightly&mode=release
pub fn foo(x: std::num::NonZeroU32) -> bool {
x.get() != 0
}
Actual:
%0 = icmp ne i32 %x, 0
ret i1 %0
Expected:
ret i1 true
cc #49137
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generationCategory: An issue proposing an enhancement or a PR with one.Category: An issue highlighting optimization opportunities or PRs implementing suchIssue: Problems and improvements with respect to performance of generated code.Relevant to the compiler team, which will review and decide on the PR/issue.Working group: LLVM backend code generation