[X86] Simplify some code in LowerBUILD_VECTORvXi1. NFCI
authorCraig Topper <craig.topper@intel.com>
Tue, 17 Sep 2019 18:02:46 +0000 (18:02 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 17 Sep 2019 18:02:46 +0000 (18:02 +0000)
commitb50894b9c369992c28f5669820bc7a1955aca947
tree29995cd629ff5d997f9b8c8df06c5218232473dd
parenta1e29a3407fbb801a6a23e490f1bbf8a4167a5b8
[X86] Simplify some code in LowerBUILD_VECTORvXi1. NFCI

The case were Immediate is 0 and HasConstElts is true should never
happen since that would mean the constant elts were all zero. But
we check for all zero build vector earlier. So just use HasConstElts
and blindly take Immediate without checking if its 0.

Move the code that bitcasts and extract the immediate into the
the HasConstElts case since the other code just creates an undef
with the right type. No casting needed.

llvm-svn: 372153
llvm/lib/Target/X86/X86ISelLowering.cpp