llvm-mirror/test/MC/Mips
Petar Jovanovic 51463c570e [Mips] Add support to match more patterns for DEXT and CINS
This patch adds support for recognizing more patterns to match to DEXT and
CINS instructions.
It finds cases where multiple instructions could be replaced with a single
DEXT or CINS instruction.

For example, for the following:

define i64 @dext_and32(i64 zeroext %a) {
entry:

 %and = and i64 %a, 4294967295
 ret i64 %and
}

instead of generating:

 0000000000000088 <dext_and32>:

 88:   64010001        daddiu  at,zero,1
 8c:   0001083c        dsll32  at,at,0x0
 90:   6421ffff        daddiu  at,at,-1
 94:   03e00008        jr      ra
 98:   00811024        and     v0,a0,at
 9c:   00000000        nop

the following gets generated:

 0000000000000068 <dext_and32>:

 68:   03e00008        jr      ra
 6c:   7c82f803        dext    v0,a0,0x0,0x20

Cases that are covered:

DEXT:

 1. and $src, mask where mask > 0xffff
 2. zext $src zero extend from i32 to i64

CINS:

 1. and (shl $src, pos), mask
 2. shl (and $src, mask), pos
 3. zext (shl $src, pos) zero extend from i32 to i64

Patch by Violeta Vukobrat.

Differential Revision: https://reviews.llvm.org/D30464

llvm-svn: 297832
2017-03-15 13:10:08 +00:00
..
cnmips
dsp
dspr2
eva
micromips [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
micromips32r6 Fix some broken CHECK lines. 2017-01-22 20:28:56 +00:00
micromips64r6 Fix some broken CHECK lines. 2017-01-22 20:28:56 +00:00
micromips-dsp
micromips-dspr2
micromips-dspr3
mips1 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips2 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips3 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips4 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips5 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips32 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips32r2 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips32r3 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips32r5 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips32r6 [mips] seb, seh instruction aliases 2016-11-22 19:17:23 +00:00
mips64 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips64r2 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips64r3 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips64r5 [mips] Correct c.cond.fmt instruction definition. 2017-01-16 13:55:58 +00:00
mips64r6 [mips] seb, seh instruction aliases 2016-11-22 19:17:23 +00:00
msa
asciiz-directive-bad.s
asciiz-directive.s
bopt-directive.s [mips] Parse the 'bopt' and 'nobopt' directives in IAS. 2017-02-01 18:50:24 +00:00
branch-pseudos-bad.s [mips] Expansion of BEQL and BNEL with immediate operands 2017-02-02 16:13:49 +00:00
branch-pseudos.s
cfi-advance-loc.s
cfi.s
cpload-bad.s
cpload.s [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
cprestore-bad.s
cprestore-noreorder-noat.s [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
cprestore-noreorder.s [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
cprestore-reorder.s [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
cprestore-warning-unused.s
cpsetup-bad.s [MC] Fix Error Location for ParseIdentifier 2016-10-12 13:58:07 +00:00
cpsetup.s [mips] Make the test case more specific and provide OS component of a triple. NFC 2016-12-08 22:10:52 +00:00
directive-ent.s [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
do_switch1.s
do_switch2.s
do_switch3.s
double-expand.s
eh-frame.s
elf_basic.s
elf_eflags_abicalls.s
elf_eflags_micromips2.s
elf_eflags_micromips.s
elf_eflags_mips16.s
elf_eflags_nan2008.s
elf_eflags_nanlegacy.s
elf_eflags_noreorder.s
elf_eflags_pic0.s
elf_eflags_pic2.s
elf_eflags.s [mips] Recommit: "N64 static relocation model support" 2017-01-27 11:36:52 +00:00
elf_reginfo.s
elf_st_other.s
elf-bigendian.ll
elf-debug-section.s [llvm-readobj] Support SHT_MIPS_DWARF section type flag 2017-03-10 08:22:25 +00:00
elf-gprel-32-64.s
elf-N64.s
elf-relsym.s
elf-tls.s
end-directive.s [mips] Remove absolute size assertion for end directive 2017-02-03 15:48:53 +00:00
expansion-j-sym-pic.s Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
expansion-jal-sym-pic.s Change how we handle section symbols on ELF. 2017-02-02 21:26:06 +00:00
expr1.s Re-commit r277988: [mips][ias] Fix all the hacks related to MIPS-specific unary operators (%hi/%lo/%gp_rel/etc.). 2016-08-08 11:50:25 +00:00
got-rel-expr.s
hex-immediates.s
higher-highest-addressing.s [mips] Remove CPU-only triples from llvm-objdump commands. 2016-06-03 10:22:22 +00:00
hilo-addressing.s
init-order-bug.ll
insn-directive.s
instalias-imm-expanding.s [mips][ias] Further relax operands of certain assembly instructions 2017-02-23 12:40:58 +00:00
instr-analysis.s
lit.local.cfg
llvm-mc-fixup-endianness.s
macro-abs.s
macro-bcc-imm-bad.s
macro-bcc-imm.s [mips] Expansion of BEQL and BNEL with immediate operands 2017-02-02 16:13:49 +00:00
macro-ddiv-bad.s
macro-ddiv.s [mips] Fix failing test. 2017-02-13 16:42:35 +00:00
macro-ddivu-bad.s
macro-ddivu.s [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
macro-div-bad.s [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
macro-div.s [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
macro-divu-bad.s [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
macro-divu.s [mips] divide macro instruction cleanup. 2017-02-13 16:06:48 +00:00
macro-dla-32bit.s
macro-dla.s [mips] dla expansion without the at register 2017-02-06 12:43:46 +00:00
macro-dli.s
macro-la-bad.s
macro-la-pic.s [mips] Implement 'la' macro in PIC mode for O32. 2016-06-03 09:53:06 +00:00
macro-la.s [mips] Correct label prefixes for N32 and N64. 2016-07-19 10:49:03 +00:00
macro-ld-sd.s llvm/test/MC/Mips/macro-ld-sd.s: Sweep a spurious character \xA0 in the test file. 2016-10-19 13:41:12 +00:00
macro-li-bad.s [mips][ias] fix li macro when values are negated with ~ 2016-10-05 18:26:19 +00:00
macro-li.s Fix some broken CHECK lines. 2017-01-22 20:28:56 +00:00
macro-seq.s [mips] seq macro support 2016-11-21 20:30:41 +00:00
memory-offsets.s [mips][ias] Handle more complicated expressions for memory operands 2016-10-18 15:17:17 +00:00
micromips-16-bit-instructions.s
micromips-alias.s
micromips-alu-instructions.s [mips][microMIPS] Add CodeGen support for AND*, OR16, OR*, XOR*, NOT16 and NOR instructions 2016-06-15 07:46:24 +00:00
micromips-bad-branches.s
micromips-branch-fixup.s
micromips-branch-instructions.s
micromips-control-instructions.s
micromips-diagnostic-fixup.s
micromips-el-fixup-data.s [mips][microMIPS] Implement BLTZC, BLEZC, BGEZC and BGTZC instructions, fix disassembly and add operand checking to existing B<cond>C implementations 2016-08-22 12:17:59 +00:00
micromips-expansions.s
micromips-fpu-instructions.s
micromips-func-addr.s
micromips-invalid.s [mips][micromips] Implement LD, LLD, LWU, SD, DSRL, DSRL32 and DSRLV instructions 2016-06-27 08:23:28 +00:00
micromips-jump26.s
micromips-jump-instructions.s
micromips-label-test-sections.s
micromips-label-test.s
micromips-loadstore-instructions.s
micromips-loadstore-unaligned.s
micromips-movcond-instructions.s
micromips-multiply-instructions.s
micromips-pc16-fixup.s
micromips-relocations.s
micromips-shift-instructions.s
micromips-tailr.s
micromips-trap-instructions.s
mips64-alu-instructions.s
mips64-expansions.s
mips64-instalias-imm-expanding.s [mips] Fix 64bit slt/sltu/nor with immediates 2017-02-28 15:55:23 +00:00
mips64-instructions.s
mips64-register-names-n32-n64.s
mips64-register-names-o32.s [mips] Change instruction s/daddiu/addiu/ since O32 prohibits the use of 64-bit GPRs. NFC 2016-12-08 22:10:48 +00:00
mips64eb-fixups.s
mips64extins.s [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
mips64shift.ll [mips] Remove CPU-only triples from llvm-objdump commands. 2016-06-03 10:22:22 +00:00
mips_abi_flags_xx_set.s
mips_abi_flags_xx.s [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
mips_directives_bad.s
mips_directives.s
mips_gprel16.s [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
mips-abi-bad.s
mips-alu-instructions.s
mips-bad-branches.s
mips-control-instructions.s
mips-cop0-reginfo.s
mips-coprocessor-encodings.s
mips-data-directives.s
mips-diagnostic-fixup.s
mips-expansions-bad.s [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
mips-expansions.s [mips] Add support for unaligned load/store macros. 2016-11-22 16:43:49 +00:00
mips-fpu-instructions.s
mips-hwr-register-names.s
mips-jump-delay-slots.s
mips-jump-instructions.s
mips-memory-instructions.s
mips-noat.s
mips-pc16-fixup.s
mips-pdr-bad.s
mips-pdr.s
mips-reginfo-fp32.s
mips-reginfo-fp64.s
mips-register-names-invalid.s
mips-register-names-o32.s
module-directive-bad.s
module-hardfloat.s
module-softfloat.s
mul-macro-variants.s [mips] Add test for mul macro variants 2017-02-20 10:53:03 +00:00
multi-64bit-func.ll
nabi-regs.s
nacl-mask.s [mips] Remove CPU-only triples from llvm-objdump commands. 2016-06-03 10:22:22 +00:00
nooddspreg-cmdarg.s [mips] Don't derive the default ABI from the CPU in the backend. 2016-06-23 12:42:53 +00:00
nooddspreg-error.s
nooddspreg.s [mips] Don't derive the default ABI from the CPU in the backend. 2016-06-23 12:42:53 +00:00
octeon-instructions.s
oddspreg.s [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
pr11877.s
r-mips-got-disp.s
reloc-directive-bad.s
reloc-directive-negative.s
reloc-directive.s [mips][ias] N32/N64 must not sort the relocation table. 2016-12-05 12:55:19 +00:00
relocation-n64.s [mips] Use --check-prefixes where appropriate. NFC. 2016-06-24 12:23:17 +00:00
relocation-xfail.s
relocation.s [mips][ias] Support .dtprel[d]word and .tprel[d]word directives 2016-08-22 16:18:42 +00:00
rotations32-bad.s
rotations32.s
rotations64.s
section-size.s
set-arch.s
set-at-directive-explicit-at.s
set-at-directive.s
set-at-noat-bad-syntax.s
set-defined-symbol.s [llvm-objdump] Support detection of feature bits from the object and implement this for Mips. 2016-06-16 09:17:03 +00:00
set-mips0-directive.s
set-mips16-directive.s
set-mips-directives-bad.s
set-mips-directives.s
set-nodsp.s
set-nomacro-micromips.s
set-nomacro.s [mips] Expansion of BEQL and BNEL with immediate operands 2017-02-02 16:13:49 +00:00
set-oddspreg-nooddspreg-error.s
set-oddspreg-nooddspreg.s
set-push-pop-directives-bad.s
set-push-pop-directives.s
set-softfloat-hardfloat-bad.s
set-softfloat-hardfloat.s
sext_64_32.ll [Mips] Add support to match more patterns for DEXT and CINS 2017-03-15 13:10:08 +00:00
sort-relocation-table.s
sym-expr.s
sym-offset.ll
target-soft-float.s [mips][microMIPS] Implement LDC1, SDC1, LDC2, SDC2, LWC1, SWC1, LWC2 and SWC2 instructions and add CodeGen support 2016-07-11 07:41:56 +00:00
unaligned-nops.s
update-module-level-options.s
user-macro-argument-separation.s
xgot.s