forked from OSchip/llvm-project
5c23410fdf
This updates the AVR Select8/Select16 expansion code so that, when inserting the two basic blocks for true and false conditions, any existing fallthrough on the previous block is preserved. Prior to this patch, if the block before the Select pseudo fell through to the subsequent block, two new basic blocks would be inserted at the prior fallthrough point, changing the fallthrough destination. The predecessor or successor lists were not updated, causing the BranchFolding pass at -O1 and above the rearrange basic blocks, causing an infinite loop. Not to mention the unconditional fallthrough to the true block is incorrect in of itself. This patch modifies the Select8/16 expansion so that, if inserting true and false basic blocks at a fallthrough point, the implicit branch is preserved by means of an explicit, unconditional branch to the previous fallthrough destination. Thanks to Carl Peto for reporting this bug. This fixes avr-rust bug https://github.com/avr-rust/rust/issues/123. llvm-svn: 351721 |
||
---|---|---|
.. | ||
atomics | ||
calling-conv/c | ||
features | ||
inline-asm | ||
integration | ||
intrinsics | ||
pseudo | ||
relax-mem | ||
PR31344.ll | ||
PR31345.ll | ||
PR37143.ll | ||
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 | ||
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 | ||
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 | ||
unaligned-atomic-loads.ll | ||
varargs.ll | ||
xor.ll | ||
zext.ll |