[DAGCombiner] Add two calls to isVector before making calls to getVectorElementType...
authorCraig Topper <craig.topper@intel.com>
Thu, 22 Feb 2018 07:05:27 +0000 (07:05 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 22 Feb 2018 07:05:27 +0000 (07:05 +0000)
commit1d104b996a70fe82ded7dfbc77e21b042c30943a
tree4b6b5d23437dca53d6ce1a97bb9568bfa86e735a
parent966642d5bb45363030940b5dbb8083537648ae26
[DAGCombiner] Add two calls to isVector before making calls to getVectorElementType/getVectorNumElements to avoid an assert.

We looked through a BITCAST, but the bitcast might be a from a scalar type rather than a vector.

I don't have a test case. I stumbled onto it while prototyping another change that isn't ready yet.

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