[DAGCombiner] Use tryFoldToZero to simplify some code and make it work correctly...
authorCraig Topper <craig.topper@intel.com>
Mon, 5 Nov 2018 05:53:06 +0000 (05:53 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 5 Nov 2018 05:53:06 +0000 (05:53 +0000)
commit8f2f2a76b9e954fe352319ac7cc00211c85c702c
tree5c19c890825b5d4a5de0a69b58a7bc4b40823482
parent8d64abddd1cea5385b3db8dedf89d2b3fe5fb99f
[DAGCombiner] Use tryFoldToZero to simplify some code and make it work correctly between LegalTypes and LegalOperations.

The original code avoided creating a zero vector after type legalization, but if we're after type legalization the type we have is legal. The real hazard we need to avoid is creating a build vector after op legalization. tryFoldToZero takes care of checking for this.

llvm-svn: 346119
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp