mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
283f599fca
Code like the following: define i32 @foo(i32 %a, i1 zeroext %b) addrspace(1) { entry: %conv = zext i1 %b to i32 %add = add nsw i32 %conv, %a ret i32 %add } Would compile to the following (incorrect) code: foo: mov r18, r20 clr r19 add r22, r18 adc r23, r19 sbci r24, 0 sbci r25, 0 ret Those sbci instructions are clearly wrong, they should have been adc instructions. This commit improves codegen to use adc instead: foo: mov r18, r20 clr r19 ldi r20, 0 ldi r21, 0 add r22, r18 adc r23, r19 adc r24, r20 adc r25, r21 ret This code is not optimal (it could be just 5 instructions instead of the current 9) but at least it doesn't miscompile. Differential Revision: https://reviews.llvm.org/D78439 |
||
---|---|---|
.. | ||
atomics | ||
calling-conv/c | ||
features | ||
inline-asm | ||
integration | ||
intrinsics | ||
pseudo | ||
relax-mem | ||
add.ll | ||
alloca.ll | ||
and.ll | ||
avr-rust-issue-123.ll | ||
branch-relaxation-long.ll | ||
branch-relaxation.ll | ||
brind.ll | ||
call.ll | ||
clear-bss.ll | ||
cmp.ll | ||
com.ll | ||
copy-data-to-ram.ll | ||
ctlz.ll | ||
ctpop.ll | ||
cttz.ll | ||
directmem.ll | ||
div.ll | ||
dynalloca.ll | ||
eor.ll | ||
expand-integer-failure.ll | ||
frame.ll | ||
frmidx-iterator-bug.ll | ||
hardware-mul.ll | ||
high-pressure-on-ptrregs.ll | ||
icall-func-pointer-correct-addr-space.ll | ||
impossible-reg-to-reg-copy.ll | ||
interrupts.ll | ||
io.ll | ||
issue-cannot-select-bswap.ll | ||
issue-regalloc-stackframe-folding-earlyclobber.ll | ||
large-return-size.ll | ||
lit.local.cfg | ||
load.ll | ||
lower-formal-args-struct-return.ll | ||
lower-formal-arguments-assertion.ll | ||
neg.ll | ||
no-print-operand-twice.ll | ||
or.ll | ||
PR31344.ll | ||
PR31345.ll | ||
PR37143.ll | ||
pre-schedule.ll | ||
progmem-extended.ll | ||
progmem.ll | ||
rem.ll | ||
return.ll | ||
rot.ll | ||
runtime-trig.ll | ||
rust-avr-bug-37.ll | ||
rust-avr-bug-95.ll | ||
rust-avr-bug-99.ll | ||
rust-avr-bug-112.ll | ||
sections.ll | ||
select-must-add-unconditional-jump.ll | ||
sext.ll | ||
shift.ll | ||
sign-extension.ll | ||
smul-with-overflow.ll | ||
software-mul.ll | ||
std-ldd-immediate-overflow.ll | ||
store-undef.ll | ||
store.ll | ||
sub.ll | ||
trunc.ll | ||
umul-with-overflow.ll | ||
umul.with.overflow.i16-bug.ll | ||
unaligned-atomic-loads.ll | ||
varargs.ll | ||
xor.ll | ||
zext.ll |