llvm/test/CodeGen/Mips
Daniel Sanders efa6f4843e [mips][mips16] Fix machine verifier errors about incorrect register classes on load/stores.
Summary:
[ls][bh] and [ls][bh]u cannot use sp-relative addresses and must therefore
lower frameindex nodes such that there is a copy to a CPU16Regs register. This
is now done consistently using a separate addressing mode that does not
permit frameindex nodes.

As part of this I've had to remove an optimization that reduced the number of
instructions needed to work around the lack of sp-relative addresses on [ls][bh]
and [ls][bh]u. This optimization used one of the eight CPU16Regs registers as
a copy of the stack pointer and it's implementation was the root cause of many
of the register vs register class mismatches.

lw/sw can use sp-relative addresses but we ought to ensure that we use the
correct version of lw/sw internally for things like IAS. This is not currently
the case and this change does not fix this. However, this change does clean it
up sufficiently well to fix the machine verifier failures.

Also removed irrelevant functions from stchar.ll.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D21062

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-16 10:20:59 +00:00
..
cconv Revert "[mips][microMIPS] Implement CFC*, CTC* and LDC* instructions" 2016-05-12 12:46:06 +00:00
compactbranches [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
cstmaterialization [mips] Missing test case 2016-06-15 13:49:58 +00:00
Fast-ISel [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
llvm-ir [mips][microMIPS] Add CodeGen support for AND*, OR16, OR*, XOR*, NOT16 and NOR instructions 2016-06-15 07:46:24 +00:00
mips32r6
mips64r6
msa [mips][msa] Fix register/register-class mismatches in emitINSERT_DF_VIDX(). 2016-06-15 08:43:23 +00:00
2008-06-05-Carry.ll
2008-07-03-SRet.ll
2008-07-06-fadd64.ll
2008-07-07-Float2Int.ll
2008-07-07-FPExtend.ll
2008-07-07-IntDoubleConvertions.ll
2008-07-15-InternalConstant.ll
2008-07-15-SmallSection.ll
2008-07-16-SignExtInReg.ll
2008-07-22-Cstpool.ll
2008-07-23-fpcmp.ll
2008-07-29-icmp.ll
2008-07-31-fcopysign.ll
2008-08-01-AsmInline.ll
2008-08-03-fabs64.ll
2008-08-03-ReturnDouble.ll
2008-08-04-Bitconvert.ll
2008-08-06-Alloca.ll
2008-08-07-CC.ll
2008-08-07-FPRound.ll
2008-08-08-bswap.ll
2008-08-08-ctlz.ll
2008-10-13-LegalizerBug.ll
2008-11-10-xint_to_fp.ll
2009-11-16-CstPoolLoad.ll
2010-07-20-Switch.ll
2010-11-09-CountLeading.ll
2010-11-09-Mul.ll
2011-05-26-BranchKillsVreg.ll
2012-12-12-ExpandMemcpy.ll
2013-11-18-fp64-const0.ll
abicalls.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
abiflags32.ll
abiflags-xx.ll
addc.ll
addi.ll
addressing-mode.ll
adjust-callstack-sp.ll
align16.ll
alloca16.ll
alloca.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
analyzebranch.ll
and1.ll
asm-large-immediate.ll
assertzext-trunc.ll [mips] Sign-extend i32 values truncated from previously zero-extended i32 values. 2016-04-13 15:07:45 +00:00
atomic.ll [mips][atomics] Fix atomic instruction descriptions and uses. 2016-06-14 11:29:28 +00:00
atomicCmpSwapPW.ll [mips] Fix emitAtomicCmpSwapPartword to handle 64 bit pointers correctly 2016-04-13 16:02:25 +00:00
atomicops.ll
beqzc1.ll
beqzc.ll
biggot.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
blez_bgez.ll
blockaddr.ll
br-jmp.ll
brconeq.ll
brconeqk.ll
brconeqz.ll
brconge.ll
brcongt.ll
brconle.ll
brconlt.ll [mips][microMIPS] Revert commit r267137 2016-04-25 15:40:08 +00:00
brconne.ll
brconnek.ll
brconnez.ll
brdelayslot.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
brind.ll
brsize3.ll [mips][mips16] Use isUnconditionalBranch() in AnalyzeBranch() and constant island pass. 2016-05-06 13:23:51 +00:00
brsize3a.ll
bswap.ll
buildpairextractelementf64.ll
cache-intrinsic.ll
call-optimization.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
cannot-copy-registers.ll [mips][microMIPS] Fix for "Cannot copy registers" assertion 2016-04-13 06:17:21 +00:00
cfi_offset.ll
check-adde-redundant-moves.ll
check-noat.ll
ci2.ll
cmov.ll [mips] MIPS32/64 itineraries 2016-06-14 09:35:29 +00:00
cmplarge.ll
const1.ll
const4a.ll
const6.ll
const6a.ll
const-mult.ll [LLVM] Remove unwanted --check-prefix=CHECK from unit tests. NFC. 2016-04-19 23:51:52 +00:00
constantfp0.ll
countleading.ll [mips][micromips] Implement DCLO, DCLZ, DROTR, DROTR32 and DROTRV instructions 2016-06-16 07:06:25 +00:00
cprestore.ll
ctlz-v.ll
ctlz.ll
cttz-v.ll
dagcombine_crash.ll
DbgValueOtherTargets.test
delay-slot-fill-forward.ll
delay-slot-kill.ll
disable-tail-merge.ll
div_rem.ll
div.ll
divrem.ll [mips] Sign-extend i32 values truncated from previously zero-extended i32 values. 2016-04-13 15:07:45 +00:00
divu_remu.ll
divu.ll
double2int.ll
dsp-patterns-cmp-vselect.ll
dsp-patterns.ll
dsp-r1.ll [mips][dsp] Fix use without def on DSPCtrl registers read by rddsp intrinsic. 2016-06-14 09:29:46 +00:00
dsp-r2.ll
dsp-vec-load-store.ll
dynamic-stack-realignment.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
eh-dwarf-cfa.ll [mips] Optimize stack pointer adjustments. 2016-06-14 13:39:43 +00:00
eh-return32.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
eh-return64.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
eh.ll
ehframe-indirect.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
elf_eflags.ll
emergency-spill-slot-near-fp.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
emit-big-cst.ll
emutls_generic.ll
ex2.ll
extins.ll
f16abs.ll
fabs.ll
fastcc.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
fcmp.ll [mips][microMIPS] Add CodeGen support for AND*, OR16, OR*, XOR*, NOT16 and NOR instructions 2016-06-15 07:46:24 +00:00
fcopysign-f32-f64.ll
fcopysign.ll
fixdfsf.ll
fmadd1.ll
fneg.ll
fp16-promote.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
fp16instrinsmc.ll
fp16mix.ll
fp16static.ll
fp64a.ll
fp-indexed-ls.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
fp-spill-reload.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
fpbr.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
fpneeded.ll
fpnotneeded.ll
fpxx.ll
frame-address.ll
frem.ll
global-address.ll
global-pointer-reg.ll
gpreg-lazy-binding.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
gprestore.ll
helloworld.ll
hf1_body.ll [mips] Implement 'la' macro in PIC mode for O32. 2016-06-03 09:53:06 +00:00
hf16_1.ll
hf16call32_body.ll [mips] Enable IAS by default for 32-bit MIPS targets (O32). 2016-05-14 12:43:08 +00:00
hf16call32.ll [mips] Enable IAS by default for 32-bit MIPS targets (O32). 2016-05-14 12:43:08 +00:00
hfptrcall.ll
i32k.ll
i64arg.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
imm.ll
indirectcall.ll
init-array.ll
inlineasm64.ll
inlineasm_constraint_m.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
inlineasm_constraint_R.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
inlineasm_constraint_ZC.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
inlineasm_constraint.ll [mips] Enable IAS by default for 32-bit MIPS targets (O32). 2016-05-14 12:43:08 +00:00
inlineasm-assembler-directives.ll
inlineasm-cnstrnt-bad-I-1.ll
inlineasm-cnstrnt-bad-J.ll
inlineasm-cnstrnt-bad-K.ll
inlineasm-cnstrnt-bad-L.ll
inlineasm-cnstrnt-bad-N.ll
inlineasm-cnstrnt-bad-O.ll
inlineasm-cnstrnt-bad-P.ll
inlineasm-cnstrnt-reg64.ll
inlineasm-cnstrnt-reg.ll
inlineasm-operand-code.ll [mips] Enable IAS by default for 32-bit MIPS targets (O32). 2016-05-14 12:43:08 +00:00
inlineasmmemop.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
insn-zero-size-bb.ll
int-to-float-conversion.ll
internalfunc.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
interrupt-attr-64-error.ll
interrupt-attr-args-error.ll
interrupt-attr-error.ll
interrupt-attr.ll
jtstat.ll
l3mc.ll
largeimm1.ll [mips] Optimize stack pointer adjustments. 2016-06-14 13:39:43 +00:00
largeimmprinting.ll [mips] Optimize stack pointer adjustments. 2016-06-14 13:39:43 +00:00
lazy-binding.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
lb1.ll
lbu1.ll
lcb2.ll
lcb3c.ll
lcb4a.ll
lcb5.ll
lh1.ll
lhu1.ll
lit.local.cfg
llcarry.ll
load-store-left-right.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
longbranch.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
lw16-base-reg.ll [mips][microMIPS] Fix for "Cannot copy registers" assertion 2016-04-13 06:17:21 +00:00
machineverifier.ll
madd-msub.ll
mature-mc-support.ll
mbrsize4a.ll
memcpy.ll
micromips-addiu.ll [mips][micromips] Make getPointerRegClass() result depend on the instruction. 2016-05-09 13:38:25 +00:00
micromips-addu16.ll
micromips-and16.ll
micromips-andi.ll [mips][microMIPS] Revert commits r264245 and r264248. 2016-04-02 23:06:13 +00:00
micromips-atomic1.ll [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
micromips-atomic.ll
micromips-compact-branches.ll
micromips-compact-jump.ll
micromips-delay-slot-jr.ll
micromips-delay-slot.ll
micromips-directives.ll
micromips-gp-rc.ll [mips][microMIPS] Revert commits r264245 and r264248. 2016-04-02 23:06:13 +00:00
micromips-jal.ll
micromips-li.ll
micromips-load-effective-address.ll
micromips-not16.ll
micromips-or16.ll
micromips-rdhwr-directives.ll
micromips-shift.ll [mips][microMIPS] Add CodeGen support for SLL16, SRL16, SLL, SLLV, SRA, SRAV, SRL and SRLV instructions 2016-04-27 11:02:23 +00:00
micromips-subu16.ll
micromips-sw-lw-16.ll
micromips-xor16.ll
mips16_32_1.ll
mips16_32_3.ll
mips16_32_4.ll
mips16_32_5.ll
mips16_32_6.ll
mips16_32_7.ll
mips16_32_8.ll
mips16_32_9.ll
mips16_32_10.ll
mips16_fpret.ll
mips16-hf-attr-2.ll
mips16-hf-attr.ll
mips16ex.ll
mips16fpe.ll [mips][mips16] Fix ZERO is not a CPU16Regs register error from the machine verifier. 2016-05-19 10:42:14 +00:00
mips64-f128-call.ll
mips64-f128.ll Summary: 2016-04-14 13:43:17 +00:00
mips64-libcall.ll
mips64-sret.ll
mips64directive.ll
mips64ext.ll
mips64extins.ll
mips64fpimm0.ll
mips64fpldst.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
mips64imm.ll
mips64instrs.ll
mips64intldst.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
mips64lea.ll
mips64muldiv.ll
mips64shift.ll [mips][micromips] Implement DCLO, DCLZ, DROTR, DROTR32 and DROTRV instructions 2016-06-16 07:06:25 +00:00
mips64signextendsesf.ll
mips64sinttofpsf.ll
mips-shf-gprel.s
mipslopat.ll
misha.ll
mno-ldc1-sdc1.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
mul.ll
mulll.ll
mulull.ll
nacl-align.ll
nacl-branch-delay.ll
nacl-reserved-regs.ll
named-register-n32.ll
named-register-n64.ll
named-register-o32.ll
neg1.ll
no-odd-spreg-msa.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
no-odd-spreg.ll
nomips16.ll
not1.ll
null-streamer.ll
null.ll
o32_cc_byval.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
o32_cc_vararg.ll
o32_cc.ll [mips] Removed invalid test from o32_cc.ll 2016-06-15 09:47:27 +00:00
octeon_popcnt.ll [mips] Sign-extend i32 values truncated from previously zero-extended i32 values. 2016-04-13 15:07:45 +00:00
octeon.ll
optimize-fp-math.ll
optimize-pic-o0.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
or1.ll
powif64_16.ll
prevent-hoisting.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
private.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
ra-allocatable.ll
rdhwr-directives.ll
rem.ll
remat-immed-load.ll
remu.ll
return_address.ll
return-vector.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
rotate.ll [mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add tests for LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instructions 2016-05-04 12:02:12 +00:00
s2rem.ll
sb1.ll
sel1c.ll
sel2c.ll
select.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
selectcc.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
seleq.ll
seleqk.ll
selgek.ll
selgt.ll
selle.ll
selltk.ll
selne.ll
selnek.ll
selpat.ll
selTBteqzCmpi.ll
selTBtnezCmpi.ll
selTBtnezSlti.ll
setcc-se.ll
seteq.ll [mips][microMIPS] Revert commit r267137 2016-04-25 15:40:08 +00:00
seteqz.ll
setge.ll
setgek.ll
setle.ll
setlt.ll
setltk.ll [mips][microMIPS] Revert commit r267137 2016-04-25 15:40:08 +00:00
setne.ll [mips][microMIPS] Revert commit r267137 2016-04-25 15:40:08 +00:00
setuge.ll
setugt.ll
setule.ll
setult.ll
setultk.ll
sh1.ll
shift-parts.ll
simplebr.ll
sint-fp-store_pattern.ll
sitofp-selectcc-opt.ll
sll1.ll
sll2.ll
small-section-reserve-gp.ll
spill-copy-acreg.ll
sr1.ll
sra1.ll
sra2.ll
srl1.ll
srl2.ll
stack-alignment.ll
stackcoloring.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
stacksize.ll
start-asm-file.ll
stchar.ll [mips][mips16] Fix machine verifier errors about incorrect register classes on load/stores. 2016-06-16 10:20:59 +00:00
stldst.ll [mips][mips16] Fix machine verifier errors about incorrect register classes on load/stores. 2016-06-16 10:20:59 +00:00
sub1.ll
sub2.ll
swzero.ll
tail16.ll
tailcall.ll [mips][mips16] Fix machine verifier errors about incorrect register classes on load/stores. 2016-06-16 10:20:59 +00:00
thread-pointer.ll [Mips] Add support for llvm.thread.pointer intrinsic. 2016-04-27 17:21:49 +00:00
tls16_2.ll
tls16.ll
tls-alias.ll
tls-models.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
tls.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
tnaked.ll
trap1.ll
trap.ll
uitofp.ll
ul1.ll
unalignedload.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00
vector-load-store.ll
vector-setcc.ll
weak.ll
xor1.ll
zeroreg.ll [mips] Make Static a default relocation model for MIPS codegen 2016-04-11 15:24:23 +00:00