[llvm] r318892 - [X86] Simplify some bitmasking and use llvm_unreachable to mark an impossible case. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 19:23:59 PST 2017
Author: ctopper
Date: Wed Nov 22 19:23:59 2017
New Revision: 318892
URL: http://llvm.org/viewvc/llvm-project?rev=318892&view=rev
Log:
[X86] Simplify some bitmasking and use llvm_unreachable to mark an impossible case. NFC
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=318892&r1=318891&r2=318892&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Nov 22 19:23:59 2017
@@ -8112,8 +8112,8 @@ X86TargetLowering::LowerBUILD_VECTOR(SDV
}
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;
More information about the llvm-commits
mailing list