[X86] Simplify some bitmasking and use llvm_unreachable to mark an impossible case. NFC

llvm-svn: 318892
This commit is contained in:
Craig Topper 2017-11-23 03:23:59 +00:00
parent ac4b0b1a2a
commit 2a38887f28
1 changed files with 2 additions and 2 deletions

View File

@ -8112,8 +8112,8 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
}
for (unsigned i = 0; i < 2; ++i) {
switch ((NonZeros & (0x3 << i*2)) >> (i*2)) {
default: break;
switch ((NonZeros >> (i*2)) & 0x3) {
default: llvm_unreachable("Unexpected NonZero count");
case 0:
Ops[i] = Ops[i*2]; // Must be a zero vector.
break;