llvm-mirror/test/MC
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
..
AArch64 [Assembler] Add location info to unary expressions. 2017-03-10 13:08:20 +00:00
AMDGPU [AMDGPU][MC] Fix for Bug 30829 + LIT tests 2017-03-03 14:31:06 +00:00
ARM [ARM] Fix for branch label disassembly for Thumb 2017-03-15 10:21:23 +00:00
AsmParser Move test input to directory called Inputs. 2017-01-06 10:22:15 +00:00
AVR [AVR] Add all of the machine code test suite 2016-11-09 23:46:25 +00:00
COFF MC/COFF: Do not emit forward associative section referenceds. 2017-02-17 17:32:54 +00:00
Disassembler AMDGPU: Add definition for v_swap_b32 2017-02-28 21:09:04 +00:00
ELF Fix asm printing of associated sections. 2017-03-14 19:28:51 +00:00
Hexagon [Hexagon] Fix testcase accidentally broken by r296645 2017-03-01 17:53:42 +00:00
Lanai [lanai] Add more tests for assembly of conditional ALU ops 2016-07-11 17:58:16 +00:00
MachO MCMacho: Allow __thread_ptr section after dwarf sections 2017-02-01 01:31:36 +00:00
Markup
Mips [Mips] Add support to match more patterns for DEXT and CINS 2017-03-15 13:10:08 +00:00
PowerPC [PowerPC][Altivec] Add vnot extended mnemonic 2017-02-07 18:57:29 +00:00
Sparc Don't pass a Reloc::Model to MC. 2016-05-18 11:58:50 +00:00
SystemZ [SystemZ] Support remaining atomic instructions 2016-12-02 18:24:16 +00:00
WebAssembly [WebAssembly] Implement the wasm binary container header. 2017-02-22 18:50:20 +00:00
X86 [X86] Clzero intrinsic and its addition under znver1 2017-02-09 04:27:34 +00:00