[InstCombine] fix use of base VectorType; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 1 Jun 2020 18:06:46 +0000 (14:06 -0400)
committerSanjay Patel <spatel@rotateright.com>
Mon, 1 Jun 2020 18:28:31 +0000 (14:28 -0400)
commit26ebe936f3ba63a2365f660509026e11fa0d695a
tree6fc8a3c879eb51b8e2e1af34dd2d53eca18c5396
parent89d48ccabe6a950369b2bd922b1d8e987b856ac7
[InstCombine] fix use of base VectorType; NFC

SimplifyDemandedVectorElts() bails out on ScalableVectorType
anyway, but we can exit faster with the external check.

Move this to a helper function because there are likely other
vector folds that we can try here.
llvm/lib/Transforms/InstCombine/InstCombineInternal.h
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp