-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
A miscompilation with -C lto -O -C target-cpu=haswell #45145
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.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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.C-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This small program solves the Euler problem n.97:
If I compile it with normal compilation arguments like this it works correctly:
rustc -C lto -O -C target-cpu=haswell e97.rsIf I compile it with -C target-cpu=native or like this, it asserts at run time:
rustc -C lto -O -C target-cpu=haswell e97.rsThe asm compiling with:
rustc -C lto -O --emit asm e97.rsThe asm compiling with:
rustc -C lto -O -C target-cpu=haswell --emit asm e97.rs