generalize binop reassociation; NFC
authorSanjay Patel <spatel@rotateright.com>
Wed, 29 Apr 2015 22:30:02 +0000 (22:30 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 29 Apr 2015 22:30:02 +0000 (22:30 +0000)
commit3c2da524a63b31f3a9cf9f9219fb18c7ffb7c6f9
treefc1420335505fc5862d3a7acf68d196d0186426f
parentec4a38903904803766308ae2d73f8174d851ffd3
generalize binop reassociation; NFC

Move the fold introduced in r236031:
http://reviews.llvm.org/rL236031

to its own helper function, so we can use it for other binops.

This is a preliminary step before partially solving:
https://llvm.org/bugs/show_bug.cgi?id=21768
https://llvm.org/bugs/show_bug.cgi?id=23116

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236171 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp