llvm-6502/test/CodeGen
Kai Nacke ceb3b46490 PR16726: extend rol/ror matching
C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.

This commit extends the DAGCombiner in the way that the pattern

(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))

is folded into

([az]ext (rotl x, y))

The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.

This fixes PR16726.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191049 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 23:00:28 +00:00
..
AArch64
ARM [ARMv8] Add support for the v8 cryptography extensions. 2013-09-19 11:59:01 +00:00
CPP
Generic
Hexagon
Inputs
Mips Fix two issues regarding Got pointer (GP) setup. 2013-09-18 22:46:09 +00:00
MSP430
NVPTX [NVPTX] Make constant vector test case endian-independent 2013-09-19 13:14:44 +00:00
PowerPC
R600
SPARC
SystemZ
Thumb
Thumb2
X86 PR16726: extend rol/ror matching 2013-09-19 23:00:28 +00:00
XCore