Potential bug in shl operator implementation #52
Labels
A-llvm
Affects the LLVM AVR backend
has-llvm-commit
This issue should be fixed in upstream LLVM
has-reduced-testcase
A small LLVM IR file exists that demonstrates the problem
avrio.c.txt
avrio.ll.txt
blink.s.txt
I notice that this IL...
There is what looks like an error with the shl operator implementation.
This seems to be the assembly language created...
I think the issue is with cp r30, r0. I don't see anywhere in the full assembly that r0 is set, meaning that it could be any value. After a power on it should probably be 0 so this may work in most cases but it looks like a bug. Should it not instead be cpi r30, 00?
It's pretty weird that this IL resulted from compiling the attached c file as I've tried very hard to force unsigned char as the data type everywhere but that's a front end issue rather than an IL -> AVR ASM issue.
The text was updated successfully, but these errors were encountered: