-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessO-MIPSTarget: MIPS processorsTarget: MIPS processorsP-mediumMedium priorityMedium priorityT-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.
Description
I tried this code:
const SHIFTVALUE : i64 = 10000000000i64;
fn main() {
fn shiftleft(a : i64, b : i64) -> i64 {
a << b
}
assert_eq!(shiftleft(black_box(SHIFTVALUE), black_box(2)), SHIFTVALUE << 2);
}
Nightly fails running on MIPS emulator
assertion left == right
failed
left: 35705032704
right: 40000000000
Stable succeeds
Looks like the top and bottom dwords are mixed up
target is mips-unknown-linux-musl
emulator is qemu-mips-static
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.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessO-MIPSTarget: MIPS processorsTarget: MIPS processorsP-mediumMedium priorityMedium priorityT-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.