[VectorCombine] refactor to reduce duplicated code; NFC
authorSanjay Patel <spatel@rotateright.com>
Fri, 21 Feb 2020 20:43:05 +0000 (15:43 -0500)
committerSanjay Patel <spatel@rotateright.com>
Fri, 21 Feb 2020 20:56:00 +0000 (15:56 -0500)
commite9c79a7aef19b14e68ed50eb9382856e9453c5a0
tree4ef7fe351d7a71592c2bfb6033217e82d298de2f
parent8fa776b8ed02f36e6bc072c6748725890dfadcbe
[VectorCombine] refactor to reduce duplicated code; NFC

This should be the last step in the current cleanup.
Follow-ups should resolve the TODO about cost calc
and enable the more general case where we extract
different elements.
llvm/lib/Transforms/Vectorize/VectorCombine.cpp