Closed aykevl closed 4 years ago
I found the bug and made a patch, I'll submit it after running the tests.
I'm currently working on an upstreaming branch rather than a rebase, the fix which is now in LLVM master will flow to Rust on the next Rust LLVM update I suppose.
Ah I guess this can be closed since it's merged upstream.
I found a rather strange miscompilation. IR:
Assembly (with
llc -O2 -mcpu=atmega328p --filetype=obj test.ll
):Look at that first instruction. It's multiplying
r24
andr31
. Butr31
is not set anywhere in the code, and is not part of the passed-in parameters.EDIT: simplified even further.