[DAGCombine] Combine pattern for REV16
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 17 Feb 2020 14:49:58 +0000 (14:49 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Mon, 17 Feb 2020 14:54:17 +0000 (14:54 +0000)
commitdad5f00e3b4d437fc1247d2d84efee924ae13201
tree5990a7b76104e2f0ba797447fc9dff9e6dbc3a50
parentf4c59c0f97cd64668c50547f23249017689717af
[DAGCombine] Combine pattern for REV16

This adds another pattern to the combiner for a case that we were not handling
to generate the REV16 instruction for ARM/Thumb2 and a bswap+ror on X86.

Differential Revision: https://reviews.llvm.org/D74032
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/Thumb2/thumb2-rev16.ll
llvm/test/CodeGen/X86/rev16.ll