llvm-6502/test/CodeGen/Thumb2
Akira Hatanaka 1cdebe50c1 ARM: Fix a bug which was causing convergence failure in constant-island pass.
The bug is in ARMConstantIslands::createNewWater where the upper bound of the
new water split point is computed:

// This could point off the end of the block if we've already got constant
// pool entries following this block; only the last one is in the water list.
// Back past any possible branches (allow for a conditional and a maximally
// long unconditional).
if (BaseInsertOffset + 8 >= UserBBI.postOffset()) {
  BaseInsertOffset = UserBBI.postOffset() - UPad - 8;
  DEBUG(dbgs() << format("Move inside block: %#x\n", BaseInsertOffset));
}

The split point is supposed to be somewhere between the machine instruction that
loads from the constant pool entry and the end of the basic block, before branch
instructions. The code above is fine if the basic block is large enough and
there are a sufficient number of instructions following the machine instruction.
However, if the machine instruction is near the end of the basic block,
BaseInsertOffset can point to the machine instruction or another instruction
that precedes it, and this can lead to convergence failure.

This commit fixes this bug by ensuring BaseInsertOffset is larger than the
offset of the instruction following the constant-loading instruction.

rdar://problem/18581150


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220015 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-17 01:31:47 +00:00
..
2009-07-17-CrossRegClassCopy.ll
2009-07-21-ISelBug.ll
2009-07-23-CPIslandBug.ll
2009-07-30-PEICrash.ll
2009-08-01-WrongLDRBOpc.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2009-08-02-CoalescerBug.ll
2009-08-04-CoalescerAssert.ll
2009-08-04-CoalescerBug.ll
2009-08-04-ScavengerAssert.ll
2009-08-04-SubregLoweringBug2.ll
2009-08-04-SubregLoweringBug3.ll
2009-08-04-SubregLoweringBug.ll
2009-08-06-SpDecBug.ll ARM / x86_64 varargs: Don't save regparms in prologue without va_start 2014-08-22 21:59:26 +00:00
2009-08-07-CoalescerBug.ll
2009-08-07-NeonFPBug.ll
2009-08-08-ScavengerAssert.ll
2009-08-10-ISelBug.ll
2009-08-21-PostRAKill4.ll
2009-09-01-PostRAProlog.ll
2009-09-28-ITBlockBug.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2009-10-15-ITBlockBranch.ll
2009-11-01-CopyReg2RegBug.ll
2009-11-11-ScavengerAssert.ll
2009-11-13-STRDBug.ll
2009-12-01-LoopIVUsers.ll Delete -std-compile-opts. 2014-10-16 20:00:02 +00:00
2010-01-06-TailDuplicateLabels.ll
2010-01-19-RemovePredicates.ll
2010-02-11-phi-cycle.ll
2010-02-24-BigStack.ll
2010-03-08-addi12-ccout.ll
2010-03-15-AsmCCClobber.ll
2010-04-15-DynAllocBug.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2010-04-26-CopyRegCrash.ll
2010-05-24-rsbs.ll
2010-06-14-NEONCoalescer.ll
2010-06-19-ITBlockCrash.ll
2010-06-21-TailMergeBug.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2010-08-10-VarSizedAllocaBug.ll
2010-11-22-EpilogueBug.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2010-12-03-AddSPNarrowing.ll
2011-04-21-FILoweringBug.ll
2011-06-07-TwoAddrEarlyClobber.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
2011-12-16-T2SizeReduceAssert.ll
2012-01-13-CBNZBug.ll
2013-02-19-tail-call-register-hint.ll
2013-03-02-vduplane-nonconstant-source-index.ll
2013-03-06-vector-sext-operand-scalarize.ll
aapcs.ll [ARM] Enable DP copy, load and store instructions for FPv4-SP 2014-08-21 12:50:31 +00:00
aligned-constants.ll
aligned-spill.ll
bfi.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
bfx.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
buildvector-crash.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
carry.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
constant-islands-new-island.ll ARM: Fix a bug which was causing convergence failure in constant-island pass. 2014-10-17 01:31:47 +00:00
constant-islands.ll
cortex-fp.ll [ARM] Add support for Cortex-M7, FPv5-SP and FPv5-DP (LLVM) 2014-10-01 09:02:17 +00:00
crash.ll
cross-rc-coalescing-1.ll
cross-rc-coalescing-2.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
div.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
float-cmp.ll [ARM] Add support for Cortex-M7, FPv5-SP and FPv5-DP (LLVM) 2014-10-01 09:02:17 +00:00
float-intrinsics-double.ll [ARM] Allow selecting VRINT[APMXZR] and VCVT[BT] instructions for FPv5 2014-10-01 13:13:18 +00:00
float-intrinsics-float.ll [ARM] Allow selecting VRINT[APMXZR] and VCVT[BT] instructions for FPv5 2014-10-01 13:13:18 +00:00
float-ops.ll [ARM] Add support for Cortex-M7, FPv5-SP and FPv5-DP (LLVM) 2014-10-01 09:02:17 +00:00
frameless2.ll
frameless.ll
ifcvt-neon.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
inflate-regs.ll
inlineasm.ll
large-call.ll
large-stack.ll
ldr-str-imm12.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
lit.local.cfg Reduce verbiage of lit.local.cfg files 2014-06-09 22:42:55 +00:00
longMACt.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
lsr-deficiency.ll
machine-licm.ll
mul_const.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
pic-load.ll
segmented-stacks.ll Move the segmented stack switch to a function attribute 2014-04-10 22:58:43 +00:00
stack_guard_remat.ll [ARM] In dynamic-no-pic mode, ARM's post-RA pseudo expansion was incorrectly 2014-08-02 05:40:40 +00:00
tail-call-r9.ll
thumb2-adc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add3.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add4.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add5.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add6.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-add.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-and2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-and.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-asr2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-asr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-bcc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-bfc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-bic.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-branch.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
thumb2-call-tc.ll
thumb2-call.ll
thumb2-cbnz.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
thumb2-clz.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-cmn2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-cmn.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-cmp2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-cmp.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-eor2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-eor.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ifcvt1-tc.ll
thumb2-ifcvt1.ll
thumb2-ifcvt2.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
thumb2-ifcvt3.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
thumb2-jtb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ldm.ll Fix the Load/Store optimization pass to work with Thumb1. 2014-05-16 14:14:30 +00:00
thumb2-ldr_ext.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ldr_post.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ldr_pre.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ldr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ldrb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ldrd.ll
thumb2-ldrh.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsl2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsl.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsr2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsr3.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-lsr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mla.ll ARM: fix test case missed in previous roundup 2014-04-04 01:19:56 +00:00
thumb2-mls.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mov.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mul.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mulhi.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mvn2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-mvn.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-neg.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orn2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orn.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orr2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-orr.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-pack.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-rev16.ll
thumb2-rev.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-ror.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-rsb2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-rsb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sbc.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-select_xform.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-select.ll
thumb2-shifter.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-smla.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-smul.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-spill-q.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
thumb2-str_post.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-str_pre.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-str.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-strb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-strh.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub3.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub4.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub5.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sub.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-sxt_rot.ll ARM: spot SBFX-compatbile code expressed with sign_extend_inreg 2014-07-23 13:59:12 +00:00
thumb2-sxt-uxt.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-tbb.ll
thumb2-tbh.ll
thumb2-teq2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-teq.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-tst2.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-tst.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
thumb2-uxt_rot.ll ARM: add patterns for [su]xta[bh] from just a shift. 2014-07-23 13:59:07 +00:00
thumb2-uxtb.ll ARM: yet another round of ARM test clean ups 2014-04-03 23:47:24 +00:00
tls1.ll
tls2.ll
tpsoft.ll ARM: Fix TPsoft for Thumb mode 2014-06-24 15:45:59 +00:00
v8_IT_1.ll
v8_IT_2.ll
v8_IT_3.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
v8_IT_4.ll
v8_IT_5.ll ARM & AArch64: make use of common cmpxchg idioms after expansion 2014-05-30 10:09:59 +00:00
v8_IT_6.ll