Replace a few more "fall through" comments with LLVM_FALLTHROUGH

Follow up to r278902. I had missed "fall through", with a space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278970 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Justin Bogner 2016-08-17 20:30:52 +00:00
parent 3ed44cd787
commit 7d7a23e700
52 changed files with 209 additions and 161 deletions

View File

@ -339,7 +339,7 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
switch(c) { switch(c) {
case '-': case '-':
direction = -1; direction = -1;
// Fall through LLVM_FALLTHROUGH;
case '+': case '+':
if (cursym == SYM_CHANGE) { if (cursym == SYM_CHANGE) {
@ -360,7 +360,7 @@ void BrainF::readloop(PHINode *phi, BasicBlock *oldbb, BasicBlock *testbb,
case '<': case '<':
direction = -1; direction = -1;
// Fall through LLVM_FALLTHROUGH;
case '>': case '>':
if (cursym == SYM_MOVE) { if (cursym == SYM_MOVE) {

View File

@ -227,7 +227,7 @@ static bool isObjectSize(const Value *V, uint64_t Size, const DataLayout &DL,
Offset = 0; Offset = 0;
return V; return V;
} }
// FALL THROUGH. LLVM_FALLTHROUGH;
case Instruction::Add: case Instruction::Add:
V = GetLinearExpression(BOp->getOperand(0), Scale, Offset, ZExtBits, V = GetLinearExpression(BOp->getOperand(0), Scale, Offset, ZExtBits,
SExtBits, DL, Depth + 1, AC, DT, NSW, NUW); SExtBits, DL, Depth + 1, AC, DT, NSW, NUW);

View File

@ -1010,7 +1010,7 @@ SortNonLocalDepInfoCache(MemoryDependenceResults::NonLocalDepInfo &Cache,
MemoryDependenceResults::NonLocalDepInfo::iterator Entry = MemoryDependenceResults::NonLocalDepInfo::iterator Entry =
std::upper_bound(Cache.begin(), Cache.end() - 1, Val); std::upper_bound(Cache.begin(), Cache.end() - 1, Val);
Cache.insert(Entry, Val); Cache.insert(Entry, Val);
// FALL THROUGH. LLVM_FALLTHROUGH;
} }
case 1: case 1:
// One new entry, Just insert the new value at the appropriate position. // One new entry, Just insert the new value at the appropriate position.

View File

@ -4288,7 +4288,7 @@ const SCEV *ScalarEvolution::createNodeForSelectOrPHI(Instruction *I,
case ICmpInst::ICMP_SLT: case ICmpInst::ICMP_SLT:
case ICmpInst::ICMP_SLE: case ICmpInst::ICMP_SLE:
std::swap(LHS, RHS); std::swap(LHS, RHS);
// fall through LLVM_FALLTHROUGH;
case ICmpInst::ICMP_SGT: case ICmpInst::ICMP_SGT:
case ICmpInst::ICMP_SGE: case ICmpInst::ICMP_SGE:
// a >s b ? a+x : b+x -> smax(a, b)+x // a >s b ? a+x : b+x -> smax(a, b)+x
@ -4311,7 +4311,7 @@ const SCEV *ScalarEvolution::createNodeForSelectOrPHI(Instruction *I,
case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_ULT:
case ICmpInst::ICMP_ULE: case ICmpInst::ICMP_ULE:
std::swap(LHS, RHS); std::swap(LHS, RHS);
// fall through LLVM_FALLTHROUGH;
case ICmpInst::ICMP_UGT: case ICmpInst::ICMP_UGT:
case ICmpInst::ICMP_UGE: case ICmpInst::ICMP_UGE:
// a >u b ? a+x : b+x -> umax(a, b)+x // a >u b ? a+x : b+x -> umax(a, b)+x
@ -8502,7 +8502,7 @@ static bool IsKnownPredicateViaMinOrMax(ScalarEvolution &SE,
case ICmpInst::ICMP_SGE: case ICmpInst::ICMP_SGE:
std::swap(LHS, RHS); std::swap(LHS, RHS);
// fall through LLVM_FALLTHROUGH;
case ICmpInst::ICMP_SLE: case ICmpInst::ICMP_SLE:
return return
// min(A, ...) <= A // min(A, ...) <= A
@ -8512,7 +8512,7 @@ static bool IsKnownPredicateViaMinOrMax(ScalarEvolution &SE,
case ICmpInst::ICMP_UGE: case ICmpInst::ICMP_UGE:
std::swap(LHS, RHS); std::swap(LHS, RHS);
// fall through LLVM_FALLTHROUGH;
case ICmpInst::ICMP_ULE: case ICmpInst::ICMP_ULE:
return return
// min(A, ...) <= A // min(A, ...) <= A
@ -9858,8 +9858,10 @@ ScalarEvolution::computeBlockDisposition(const SCEV *S, const BasicBlock *BB) {
const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S); const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(S);
if (!DT.dominates(AR->getLoop()->getHeader(), BB)) if (!DT.dominates(AR->getLoop()->getHeader(), BB))
return DoesNotDominateBlock; return DoesNotDominateBlock;
// Fall through into SCEVNAryExpr handling.
LLVM_FALLTHROUGH;
} }
// FALL THROUGH into SCEVNAryExpr handling.
case scAddExpr: case scAddExpr:
case scMulExpr: case scMulExpr:
case scUMaxExpr: case scUMaxExpr:

View File

@ -324,6 +324,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
// on Linux. // on Linux.
// //
// Fall through to disable all of them. // Fall through to disable all of them.
LLVM_FALLTHROUGH;
default: default:
TLI.setUnavailable(LibFunc::exp10); TLI.setUnavailable(LibFunc::exp10);
TLI.setUnavailable(LibFunc::exp10f); TLI.setUnavailable(LibFunc::exp10f);

View File

@ -1012,7 +1012,8 @@ static void computeKnownBitsFromOperator(const Operator *I, APInt &KnownZero,
case Instruction::PtrToInt: case Instruction::PtrToInt:
case Instruction::IntToPtr: case Instruction::IntToPtr:
case Instruction::AddrSpaceCast: // Pointers could be different sizes. case Instruction::AddrSpaceCast: // Pointers could be different sizes.
// FALL THROUGH and handle them the same as zext/trunc. // Fall through and handle them the same as zext/trunc.
LLVM_FALLTHROUGH;
case Instruction::ZExt: case Instruction::ZExt:
case Instruction::Trunc: { case Instruction::Trunc: {
Type *SrcTy = I->getOperand(0)->getType(); Type *SrcTy = I->getOperand(0)->getType();
@ -2559,7 +2560,7 @@ bool llvm::CannotBeOrderedLessThanZero(const Value *V,
// x*x is always non-negative or a NaN. // x*x is always non-negative or a NaN.
if (I->getOperand(0) == I->getOperand(1)) if (I->getOperand(0) == I->getOperand(1))
return true; return true;
// Fall through LLVM_FALLTHROUGH;
case Instruction::FAdd: case Instruction::FAdd:
case Instruction::FDiv: case Instruction::FDiv:
case Instruction::FRem: case Instruction::FRem:

View File

@ -1784,7 +1784,7 @@ const MCExpr *AsmPrinter::lowerConstant(const Constant *CV) {
// expression properly. This is important for differences between // expression properly. This is important for differences between
// blockaddress labels. Since the two labels are in the same function, it // blockaddress labels. Since the two labels are in the same function, it
// is reasonable to treat their delta as a 32-bit value. // is reasonable to treat their delta as a 32-bit value.
// FALL THROUGH. LLVM_FALLTHROUGH;
case Instruction::BitCast: case Instruction::BitCast:
return lowerConstant(CE->getOperand(0)); return lowerConstant(CE->getOperand(0));

View File

@ -247,17 +247,17 @@ void DIEInteger::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
// FIXME: Is there a better way to do this? // FIXME: Is there a better way to do this?
Asm->OutStreamer->AddBlankLine(); Asm->OutStreamer->AddBlankLine();
return; return;
case dwarf::DW_FORM_flag: // Fall thru case dwarf::DW_FORM_flag: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_ref1: // Fall thru case dwarf::DW_FORM_ref1: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data1: Size = 1; break; case dwarf::DW_FORM_data1: Size = 1; break;
case dwarf::DW_FORM_ref2: // Fall thru case dwarf::DW_FORM_ref2: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data2: Size = 2; break; case dwarf::DW_FORM_data2: Size = 2; break;
case dwarf::DW_FORM_sec_offset: // Fall thru case dwarf::DW_FORM_sec_offset: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_strp: // Fall thru case dwarf::DW_FORM_strp: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_ref4: // Fall thru case dwarf::DW_FORM_ref4: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data4: Size = 4; break; case dwarf::DW_FORM_data4: Size = 4; break;
case dwarf::DW_FORM_ref8: // Fall thru case dwarf::DW_FORM_ref8: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_ref_sig8: // Fall thru case dwarf::DW_FORM_ref_sig8: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data8: Size = 8; break; case dwarf::DW_FORM_data8: Size = 8; break;
case dwarf::DW_FORM_GNU_str_index: Asm->EmitULEB128(Integer); return; case dwarf::DW_FORM_GNU_str_index: Asm->EmitULEB128(Integer); return;
case dwarf::DW_FORM_GNU_addr_index: Asm->EmitULEB128(Integer); return; case dwarf::DW_FORM_GNU_addr_index: Asm->EmitULEB128(Integer); return;
@ -279,17 +279,17 @@ void DIEInteger::EmitValue(const AsmPrinter *Asm, dwarf::Form Form) const {
unsigned DIEInteger::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const { unsigned DIEInteger::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
switch (Form) { switch (Form) {
case dwarf::DW_FORM_flag_present: return 0; case dwarf::DW_FORM_flag_present: return 0;
case dwarf::DW_FORM_flag: // Fall thru case dwarf::DW_FORM_flag: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_ref1: // Fall thru case dwarf::DW_FORM_ref1: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data1: return sizeof(int8_t); case dwarf::DW_FORM_data1: return sizeof(int8_t);
case dwarf::DW_FORM_ref2: // Fall thru case dwarf::DW_FORM_ref2: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data2: return sizeof(int16_t); case dwarf::DW_FORM_data2: return sizeof(int16_t);
case dwarf::DW_FORM_sec_offset: // Fall thru case dwarf::DW_FORM_sec_offset: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_strp: // Fall thru case dwarf::DW_FORM_strp: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_ref4: // Fall thru case dwarf::DW_FORM_ref4: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data4: return sizeof(int32_t); case dwarf::DW_FORM_data4: return sizeof(int32_t);
case dwarf::DW_FORM_ref8: // Fall thru case dwarf::DW_FORM_ref8: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_ref_sig8: // Fall thru case dwarf::DW_FORM_ref_sig8: LLVM_FALLTHROUGH;
case dwarf::DW_FORM_data8: return sizeof(int64_t); case dwarf::DW_FORM_data8: return sizeof(int64_t);
case dwarf::DW_FORM_GNU_str_index: return getULEB128Size(Integer); case dwarf::DW_FORM_GNU_str_index: return getULEB128Size(Integer);
case dwarf::DW_FORM_GNU_addr_index: return getULEB128Size(Integer); case dwarf::DW_FORM_GNU_addr_index: return getULEB128Size(Integer);

View File

@ -360,7 +360,7 @@ void RAFast::usePhysReg(MachineOperand &MO) {
break; break;
case regReserved: case regReserved:
PhysRegState[PhysReg] = regFree; PhysRegState[PhysReg] = regFree;
// Fall through LLVM_FALLTHROUGH;
case regFree: case regFree:
MO.setIsKill(); MO.setIsKill();
return; return;
@ -389,7 +389,7 @@ void RAFast::usePhysReg(MachineOperand &MO) {
assert((TRI->isSuperRegister(PhysReg, Alias) || assert((TRI->isSuperRegister(PhysReg, Alias) ||
TRI->isSuperRegister(Alias, PhysReg)) && TRI->isSuperRegister(Alias, PhysReg)) &&
"Instruction is not using a subregister of a reserved register"); "Instruction is not using a subregister of a reserved register");
// Fall through. LLVM_FALLTHROUGH;
case regFree: case regFree:
if (TRI->isSuperRegister(PhysReg, Alias)) { if (TRI->isSuperRegister(PhysReg, Alias)) {
// Leave the superregister in the working set. // Leave the superregister in the working set.
@ -421,7 +421,7 @@ void RAFast::definePhysReg(MachineInstr &MI, unsigned PhysReg,
break; break;
default: default:
spillVirtReg(MI, VirtReg); spillVirtReg(MI, VirtReg);
// Fall through. LLVM_FALLTHROUGH;
case regFree: case regFree:
case regReserved: case regReserved:
PhysRegState[PhysReg] = NewState; PhysRegState[PhysReg] = NewState;
@ -437,7 +437,7 @@ void RAFast::definePhysReg(MachineInstr &MI, unsigned PhysReg,
break; break;
default: default:
spillVirtReg(MI, VirtReg); spillVirtReg(MI, VirtReg);
// Fall through. LLVM_FALLTHROUGH;
case regFree: case regFree:
case regReserved: case regReserved:
PhysRegState[Alias] = regDisabled; PhysRegState[Alias] = regDisabled;

View File

@ -2231,8 +2231,8 @@ void JoinVals::computeAssignment(unsigned ValNo, JoinVals &Other) {
if ((OtherV.WriteLanes & ~V.ValidLanes) != 0 && TrackSubRegLiveness) if ((OtherV.WriteLanes & ~V.ValidLanes) != 0 && TrackSubRegLiveness)
OtherV.ErasableImplicitDef = false; OtherV.ErasableImplicitDef = false;
OtherV.Pruned = true; OtherV.Pruned = true;
LLVM_FALLTHROUGH;
} }
// Fall through.
default: default:
// This value number needs to go in the final joined live range. // This value number needs to go in the final joined live range.
Assignments[ValNo] = NewVNInfo.size(); Assignments[ValNo] = NewVNInfo.size();
@ -2517,7 +2517,7 @@ void JoinVals::eraseInstrs(SmallPtrSetImpl<MachineInstr*> &ErasedInstrs,
// make it appear like an unused value number. // make it appear like an unused value number.
VNI->markUnused(); VNI->markUnused();
DEBUG(dbgs() << "\t\tremoved " << i << '@' << Def << ": " << LR << '\n'); DEBUG(dbgs() << "\t\tremoved " << i << '@' << Def << ": " << LR << '\n');
// FALL THROUGH. LLVM_FALLTHROUGH;
} }
case CR_Erase: { case CR_Erase: {

View File

@ -1579,7 +1579,7 @@ SDValue DAGCombiner::visitTokenFactor(SDNode *N) {
Changed = true; Changed = true;
break; break;
} }
// Fall thru LLVM_FALLTHROUGH;
default: default:
// Only add if it isn't already in the list. // Only add if it isn't already in the list.

View File

@ -1123,12 +1123,12 @@ void SelectionDAGLegalize::LegalizeOp(SDNode *Node) {
ReplaceNode(Node, ResultVals.data()); ReplaceNode(Node, ResultVals.data());
return; return;
} }
LLVM_FALLTHROUGH;
} }
// FALL THROUGH
case TargetLowering::Expand: case TargetLowering::Expand:
if (ExpandNode(Node)) if (ExpandNode(Node))
return; return;
// FALL THROUGH LLVM_FALLTHROUGH;
case TargetLowering::LibCall: case TargetLowering::LibCall:
ConvertNodeToLibcall(Node); ConvertNodeToLibcall(Node);
return; return;

View File

@ -362,7 +362,7 @@ SDValue VectorLegalizer::LegalizeOp(SDValue Op) {
Result = Tmp1; Result = Tmp1;
break; break;
} }
// FALL THROUGH LLVM_FALLTHROUGH;
} }
case TargetLowering::Expand: case TargetLowering::Expand:
Result = Expand(Op); Result = Expand(Op);

View File

@ -1943,29 +1943,29 @@ SDValue SelectionDAG::FoldSetCC(EVT VT, SDValue N1, SDValue N2,
default: break; default: break;
case ISD::SETEQ: if (R==APFloat::cmpUnordered) case ISD::SETEQ: if (R==APFloat::cmpUnordered)
return getUNDEF(VT); return getUNDEF(VT);
// fall through LLVM_FALLTHROUGH;
case ISD::SETOEQ: return getConstant(R==APFloat::cmpEqual, dl, VT); case ISD::SETOEQ: return getConstant(R==APFloat::cmpEqual, dl, VT);
case ISD::SETNE: if (R==APFloat::cmpUnordered) case ISD::SETNE: if (R==APFloat::cmpUnordered)
return getUNDEF(VT); return getUNDEF(VT);
// fall through LLVM_FALLTHROUGH;
case ISD::SETONE: return getConstant(R==APFloat::cmpGreaterThan || case ISD::SETONE: return getConstant(R==APFloat::cmpGreaterThan ||
R==APFloat::cmpLessThan, dl, VT); R==APFloat::cmpLessThan, dl, VT);
case ISD::SETLT: if (R==APFloat::cmpUnordered) case ISD::SETLT: if (R==APFloat::cmpUnordered)
return getUNDEF(VT); return getUNDEF(VT);
// fall through LLVM_FALLTHROUGH;
case ISD::SETOLT: return getConstant(R==APFloat::cmpLessThan, dl, VT); case ISD::SETOLT: return getConstant(R==APFloat::cmpLessThan, dl, VT);
case ISD::SETGT: if (R==APFloat::cmpUnordered) case ISD::SETGT: if (R==APFloat::cmpUnordered)
return getUNDEF(VT); return getUNDEF(VT);
// fall through LLVM_FALLTHROUGH;
case ISD::SETOGT: return getConstant(R==APFloat::cmpGreaterThan, dl, VT); case ISD::SETOGT: return getConstant(R==APFloat::cmpGreaterThan, dl, VT);
case ISD::SETLE: if (R==APFloat::cmpUnordered) case ISD::SETLE: if (R==APFloat::cmpUnordered)
return getUNDEF(VT); return getUNDEF(VT);
// fall through LLVM_FALLTHROUGH;
case ISD::SETOLE: return getConstant(R==APFloat::cmpLessThan || case ISD::SETOLE: return getConstant(R==APFloat::cmpLessThan ||
R==APFloat::cmpEqual, dl, VT); R==APFloat::cmpEqual, dl, VT);
case ISD::SETGE: if (R==APFloat::cmpUnordered) case ISD::SETGE: if (R==APFloat::cmpUnordered)
return getUNDEF(VT); return getUNDEF(VT);
// fall through LLVM_FALLTHROUGH;
case ISD::SETOGE: return getConstant(R==APFloat::cmpGreaterThan || case ISD::SETOGE: return getConstant(R==APFloat::cmpGreaterThan ||
R==APFloat::cmpEqual, dl, VT); R==APFloat::cmpEqual, dl, VT);
case ISD::SETO: return getConstant(R!=APFloat::cmpUnordered, dl, VT); case ISD::SETO: return getConstant(R!=APFloat::cmpUnordered, dl, VT);
@ -2350,8 +2350,8 @@ void SelectionDAG::computeKnownBits(SDValue Op, APInt &KnownZero,
} }
} }
} }
LLVM_FALLTHROUGH;
} }
// fall through
case ISD::ADD: case ISD::ADD:
case ISD::ADDE: { case ISD::ADDE: {
// Output known-0 bits are known if clear or set in both the low clear bits // Output known-0 bits are known if clear or set in both the low clear bits

View File

@ -2482,7 +2482,7 @@ static bool isVectorReductionOp(const User *I) {
if (const FPMathOperator *FPOp = dyn_cast<const FPMathOperator>(Inst)) if (const FPMathOperator *FPOp = dyn_cast<const FPMathOperator>(Inst))
if (FPOp->getFastMathFlags().unsafeAlgebra()) if (FPOp->getFastMathFlags().unsafeAlgebra())
break; break;
// Fall through. LLVM_FALLTHROUGH;
default: default:
return false; return false;
} }
@ -9243,4 +9243,3 @@ void SelectionDAGBuilder::visitSwitch(const SwitchInst &SI) {
lowerWorkItem(W, SI.getCondition(), SwitchMBB, DefaultMBB); lowerWorkItem(W, SI.getCondition(), SwitchMBB, DefaultMBB);
} }
} }

View File

@ -1147,8 +1147,8 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
// See if the operation should be performed at a smaller bit width. // See if the operation should be performed at a smaller bit width.
if (TLO.ShrinkDemandedOp(Op, BitWidth, NewMask, dl)) if (TLO.ShrinkDemandedOp(Op, BitWidth, NewMask, dl))
return true; return true;
LLVM_FALLTHROUGH;
} }
// FALL THROUGH
default: default:
// Just use computeKnownBits to compute output bits. // Just use computeKnownBits to compute output bits.
TLO.DAG.computeKnownBits(Op, KnownZero, KnownOne, Depth); TLO.DAG.computeKnownBits(Op, KnownZero, KnownOne, Depth);
@ -2301,7 +2301,7 @@ void TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
Ops.push_back(Op); Ops.push_back(Op);
return; return;
} }
// fall through LLVM_FALLTHROUGH;
case 'i': // Simple Integer or Relocatable Constant case 'i': // Simple Integer or Relocatable Constant
case 'n': // Simple Integer case 'n': // Simple Integer
case 's': { // Relocatable Constant case 's': { // Relocatable Constant

View File

@ -286,7 +286,7 @@ size_t MutationDispatcher::Mutate_CrossOver(uint8_t *Data, size_t Size,
NewSize = InsertPartOf(O.data(), O.size(), U.data(), U.size(), MaxSize); NewSize = InsertPartOf(O.data(), O.size(), U.data(), U.size(), MaxSize);
if (NewSize) if (NewSize)
break; break;
// Fallthrough LLVM_FALLTHROUGH;
case 2: case 2:
NewSize = CopyPartOf(O.data(), O.size(), U.data(), U.size()); NewSize = CopyPartOf(O.data(), O.size(), U.data(), U.size());
break; break;

View File

@ -748,9 +748,9 @@ static void DecodeIITType(unsigned &NextElt, ArrayRef<unsigned char> Infos,
case IIT_EMPTYSTRUCT: case IIT_EMPTYSTRUCT:
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Struct, 0)); OutputTable.push_back(IITDescriptor::get(IITDescriptor::Struct, 0));
return; return;
case IIT_STRUCT5: ++StructElts; // FALL THROUGH. case IIT_STRUCT5: ++StructElts; LLVM_FALLTHROUGH;
case IIT_STRUCT4: ++StructElts; // FALL THROUGH. case IIT_STRUCT4: ++StructElts; LLVM_FALLTHROUGH;
case IIT_STRUCT3: ++StructElts; // FALL THROUGH. case IIT_STRUCT3: ++StructElts; LLVM_FALLTHROUGH;
case IIT_STRUCT2: { case IIT_STRUCT2: {
OutputTable.push_back(IITDescriptor::get(IITDescriptor::Struct,StructElts)); OutputTable.push_back(IITDescriptor::get(IITDescriptor::Struct,StructElts));

View File

@ -311,6 +311,7 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T) {
if (Ctx->getAsmInfo()->getExceptionHandlingType() == ExceptionHandling::ARM) if (Ctx->getAsmInfo()->getExceptionHandlingType() == ExceptionHandling::ARM)
break; break;
// Fallthrough if not using EHABI // Fallthrough if not using EHABI
LLVM_FALLTHROUGH;
case Triple::ppc: case Triple::ppc:
case Triple::x86: case Triple::x86:
PersonalityEncoding = PositionIndependent PersonalityEncoding = PositionIndependent

View File

@ -1228,7 +1228,7 @@ bool CommandLineParser::ParseCommandLineOptions(int argc,
switch (PositionalOpts[i]->getNumOccurrencesFlag()) { switch (PositionalOpts[i]->getNumOccurrencesFlag()) {
case cl::Optional: case cl::Optional:
Done = true; // Optional arguments want _at most_ one value Done = true; // Optional arguments want _at most_ one value
// FALL THROUGH LLVM_FALLTHROUGH;
case cl::ZeroOrMore: // Zero or more will take all they can get... case cl::ZeroOrMore: // Zero or more will take all they can get...
case cl::OneOrMore: // One or more will take all they can get... case cl::OneOrMore: // One or more will take all they can get...
ProvidePositionalOption(PositionalOpts[i], ProvidePositionalOption(PositionalOpts[i],
@ -1282,7 +1282,7 @@ bool CommandLineParser::ParseCommandLineOptions(int argc,
Opt.second->error("must be specified at least once!"); Opt.second->error("must be specified at least once!");
ErrorParsing = true; ErrorParsing = true;
} }
// Fall through LLVM_FALLTHROUGH;
default: default:
break; break;
} }
@ -1337,7 +1337,7 @@ bool Option::addOccurrence(unsigned pos, StringRef ArgName, StringRef Value,
case Required: case Required:
if (NumOccurrences > 1) if (NumOccurrences > 1)
return error("must occur exactly one time!", ArgName); return error("must occur exactly one time!", ArgName);
// Fall through LLVM_FALLTHROUGH;
case OneOrMore: case OneOrMore:
case ZeroOrMore: case ZeroOrMore:
case ConsumeAfter: case ConsumeAfter:

View File

@ -127,8 +127,8 @@ void FoldingSetNodeID::AddString(StringRef String) {
// Pos will have overshot size by 4 - #bytes left over. // Pos will have overshot size by 4 - #bytes left over.
// No need to take endianness into account here - this is always executed. // No need to take endianness into account here - this is always executed.
switch (Pos - Size) { switch (Pos - Size) {
case 1: V = (V << 8) | (unsigned char)String[Size - 3]; // Fall thru. case 1: V = (V << 8) | (unsigned char)String[Size - 3]; LLVM_FALLTHROUGH;
case 2: V = (V << 8) | (unsigned char)String[Size - 2]; // Fall thru. case 2: V = (V << 8) | (unsigned char)String[Size - 2]; LLVM_FALLTHROUGH;
case 3: V = (V << 8) | (unsigned char)String[Size - 1]; break; case 3: V = (V << 8) | (unsigned char)String[Size - 1]; break;
default: return; // Nothing left. default: return; // Nothing left.
} }

View File

@ -344,10 +344,10 @@ void raw_ostream::copy_to_buffer(const char *Ptr, size_t Size) {
// Handle short strings specially, memcpy isn't very good at very short // Handle short strings specially, memcpy isn't very good at very short
// strings. // strings.
switch (Size) { switch (Size) {
case 4: OutBufCur[3] = Ptr[3]; // FALL THROUGH case 4: OutBufCur[3] = Ptr[3]; LLVM_FALLTHROUGH;
case 3: OutBufCur[2] = Ptr[2]; // FALL THROUGH case 3: OutBufCur[2] = Ptr[2]; LLVM_FALLTHROUGH;
case 2: OutBufCur[1] = Ptr[1]; // FALL THROUGH case 2: OutBufCur[1] = Ptr[1]; LLVM_FALLTHROUGH;
case 1: OutBufCur[0] = Ptr[0]; // FALL THROUGH case 1: OutBufCur[0] = Ptr[0]; LLVM_FALLTHROUGH;
case 0: break; case 0: break;
default: default:
memcpy(OutBufCur, Ptr, Size); memcpy(OutBufCur, Ptr, Size);

View File

@ -222,7 +222,7 @@ tgtok::TokKind TGLexer::LexString() {
case '\0': case '\0':
if (CurPtr == CurBuf.end()) if (CurPtr == CurBuf.end())
return ReturnError(StrStart, "End of file in string literal"); return ReturnError(StrStart, "End of file in string literal");
// FALL THROUGH LLVM_FALLTHROUGH;
default: default:
return ReturnError(CurPtr, "invalid escape in string literal"); return ReturnError(CurPtr, "invalid escape in string literal");
} }

View File

@ -329,7 +329,7 @@ MachineInstr *SSACCmpConv::findConvertibleCompare(MachineBasicBlock *MBB) {
++NumImmRangeRejs; ++NumImmRangeRejs;
return nullptr; return nullptr;
} }
// Fall through. LLVM_FALLTHROUGH;
case AArch64::SUBSWrr: case AArch64::SUBSWrr:
case AArch64::SUBSXrr: case AArch64::SUBSXrr:
case AArch64::ADDSWrr: case AArch64::ADDSWrr:

View File

@ -7057,7 +7057,7 @@ bool AArch64TargetLowering::isExtFreeImpl(const Instruction *Ext) const {
// trunc(sext ty1 to ty2) to ty1. // trunc(sext ty1 to ty2) to ty1.
if (Instr->getType() == Ext->getOperand(0)->getType()) if (Instr->getType() == Ext->getOperand(0)->getType())
continue; continue;
// FALL THROUGH. LLVM_FALLTHROUGH;
default: default:
return false; return false;
} }

View File

@ -286,7 +286,7 @@ void AMDGPUAsmPrinter::EmitProgramInfoR600(const MachineFunction &MF) {
if (STM.getGeneration() >= R600Subtarget::EVERGREEN) { if (STM.getGeneration() >= R600Subtarget::EVERGREEN) {
// Evergreen / Northern Islands // Evergreen / Northern Islands
switch (MF.getFunction()->getCallingConv()) { switch (MF.getFunction()->getCallingConv()) {
default: // Fall through default: LLVM_FALLTHROUGH;
case CallingConv::AMDGPU_CS: RsrcReg = R_0288D4_SQ_PGM_RESOURCES_LS; break; case CallingConv::AMDGPU_CS: RsrcReg = R_0288D4_SQ_PGM_RESOURCES_LS; break;
case CallingConv::AMDGPU_GS: RsrcReg = R_028878_SQ_PGM_RESOURCES_GS; break; case CallingConv::AMDGPU_GS: RsrcReg = R_028878_SQ_PGM_RESOURCES_GS; break;
case CallingConv::AMDGPU_PS: RsrcReg = R_028844_SQ_PGM_RESOURCES_PS; break; case CallingConv::AMDGPU_PS: RsrcReg = R_028844_SQ_PGM_RESOURCES_PS; break;
@ -295,9 +295,9 @@ void AMDGPUAsmPrinter::EmitProgramInfoR600(const MachineFunction &MF) {
} else { } else {
// R600 / R700 // R600 / R700
switch (MF.getFunction()->getCallingConv()) { switch (MF.getFunction()->getCallingConv()) {
default: // Fall through default: LLVM_FALLTHROUGH;
case CallingConv::AMDGPU_GS: // Fall through case CallingConv::AMDGPU_GS: LLVM_FALLTHROUGH;
case CallingConv::AMDGPU_CS: // Fall through case CallingConv::AMDGPU_CS: LLVM_FALLTHROUGH;
case CallingConv::AMDGPU_VS: RsrcReg = R_028868_SQ_PGM_RESOURCES_VS; break; case CallingConv::AMDGPU_VS: RsrcReg = R_028868_SQ_PGM_RESOURCES_VS; break;
case CallingConv::AMDGPU_PS: RsrcReg = R_028850_SQ_PGM_RESOURCES_PS; break; case CallingConv::AMDGPU_PS: RsrcReg = R_028850_SQ_PGM_RESOURCES_PS; break;
} }
@ -574,7 +574,7 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo,
static unsigned getRsrcReg(CallingConv::ID CallConv) { static unsigned getRsrcReg(CallingConv::ID CallConv) {
switch (CallConv) { switch (CallConv) {
default: // Fall through default: LLVM_FALLTHROUGH;
case CallingConv::AMDGPU_CS: return R_00B848_COMPUTE_PGM_RSRC1; case CallingConv::AMDGPU_CS: return R_00B848_COMPUTE_PGM_RSRC1;
case CallingConv::AMDGPU_GS: return R_00B228_SPI_SHADER_PGM_RSRC1_GS; case CallingConv::AMDGPU_GS: return R_00B228_SPI_SHADER_PGM_RSRC1_GS;
case CallingConv::AMDGPU_PS: return R_00B028_SPI_SHADER_PGM_RSRC1_PS; case CallingConv::AMDGPU_PS: return R_00B028_SPI_SHADER_PGM_RSRC1_PS;

View File

@ -1868,6 +1868,7 @@ CCAssignFn *ARMFastISel::CCAssignFnForCall(CallingConv::ID CC,
return (Return ? RetCC_ARM_AAPCS_VFP: CC_ARM_AAPCS_VFP); return (Return ? RetCC_ARM_AAPCS_VFP: CC_ARM_AAPCS_VFP);
// Fall through to soft float variant, variadic functions don't // Fall through to soft float variant, variadic functions don't
// use hard floating point ABI. // use hard floating point ABI.
LLVM_FALLTHROUGH;
case CallingConv::ARM_AAPCS: case CallingConv::ARM_AAPCS:
return (Return ? RetCC_ARM_AAPCS: CC_ARM_AAPCS); return (Return ? RetCC_ARM_AAPCS: CC_ARM_AAPCS);
case CallingConv::ARM_APCS: case CallingConv::ARM_APCS:

View File

@ -8659,7 +8659,7 @@ static bool isConditionalZeroOrAllOnes(SDNode *N, bool AllOnes,
// (zext cc) can never be the all ones value. // (zext cc) can never be the all ones value.
if (AllOnes) if (AllOnes)
return false; return false;
// Fall through. LLVM_FALLTHROUGH;
case ISD::SIGN_EXTEND: { case ISD::SIGN_EXTEND: {
SDLoc dl(N); SDLoc dl(N);
EVT VT = N->getValueType(0); EVT VT = N->getValueType(0);
@ -11409,7 +11409,7 @@ bool ARMTargetLowering::isLegalAddressingMode(const DataLayout &DL,
case 1: case 1:
if (Subtarget->isThumb1Only()) if (Subtarget->isThumb1Only())
return false; return false;
// FALL THROUGH. LLVM_FALLTHROUGH;
default: default:
// ARM doesn't support any R+R*scale+imm addr modes. // ARM doesn't support any R+R*scale+imm addr modes.
if (AM.BaseOffs) if (AM.BaseOffs)

View File

@ -1432,7 +1432,7 @@ static DecodeStatus DecodeCopMemInstruction(MCInst &Inst, unsigned Insn,
case ARM::STC_POST: case ARM::STC_POST:
case ARM::STCL_POST: case ARM::STCL_POST:
imm |= U << 8; imm |= U << 8;
// fall through. LLVM_FALLTHROUGH;
default: default:
// The 'option' variant doesn't encode 'U' in the immediate since // The 'option' variant doesn't encode 'U' in the immediate since
// the immediate is unsigned [0,255]. // the immediate is unsigned [0,255].
@ -2555,6 +2555,7 @@ static DecodeStatus DecodeVLDInstruction(MCInst &Inst, unsigned Insn,
break; break;
} }
// Fall through to handle the register offset variant. // Fall through to handle the register offset variant.
LLVM_FALLTHROUGH;
case ARM::VLD1d8wb_fixed: case ARM::VLD1d8wb_fixed:
case ARM::VLD1d16wb_fixed: case ARM::VLD1d16wb_fixed:
case ARM::VLD1d32wb_fixed: case ARM::VLD1d32wb_fixed:
@ -4157,7 +4158,7 @@ static DecodeStatus DecodeMSRMask(MCInst &Inst, unsigned Val,
case 0x93: // faultmask_ns case 0x93: // faultmask_ns
if (!(FeatureBits[ARM::HasV8MMainlineOps])) if (!(FeatureBits[ARM::HasV8MMainlineOps]))
return MCDisassembler::Fail; return MCDisassembler::Fail;
// fall through LLVM_FALLTHROUGH;
case 10: // msplim case 10: // msplim
case 11: // psplim case 11: // psplim
case 0x88: // msp_ns case 0x88: // msp_ns
@ -5310,4 +5311,3 @@ static DecodeStatus DecoderForMRRC2AndMCRR2(llvm::MCInst &Inst, unsigned Val,
return S; return S;
} }

View File

@ -630,7 +630,7 @@ unsigned ARMAsmBackend::adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
case ARM::fixup_arm_pcrel_10: case ARM::fixup_arm_pcrel_10:
Value = Value - 4; // ARM fixups offset by an additional word and don't Value = Value - 4; // ARM fixups offset by an additional word and don't
// need to adjust for the half-word ordering. // need to adjust for the half-word ordering.
// Fall through. LLVM_FALLTHROUGH;
case ARM::fixup_t2_pcrel_10: { case ARM::fixup_t2_pcrel_10: {
// Offset by 4, adjusted by two due to the half-word ordering of thumb. // Offset by 4, adjusted by two due to the half-word ordering of thumb.
Value = Value - 4; Value = Value - 4;
@ -657,7 +657,7 @@ unsigned ARMAsmBackend::adjustFixupValue(const MCFixup &Fixup, uint64_t Value,
case ARM::fixup_arm_pcrel_9: case ARM::fixup_arm_pcrel_9:
Value = Value - 4; // ARM fixups offset by an additional word and don't Value = Value - 4; // ARM fixups offset by an additional word and don't
// need to adjust for the half-word ordering. // need to adjust for the half-word ordering.
// Fall through. LLVM_FALLTHROUGH;
case ARM::fixup_t2_pcrel_9: { case ARM::fixup_t2_pcrel_9: {
// Offset by 4, adjusted by two due to the half-word ordering of thumb. // Offset by 4, adjusted by two due to the half-word ordering of thumb.
Value = Value - 4; Value = Value - 4;

View File

@ -116,8 +116,8 @@ bool HexagonCP::interpretAsCopy(const MachineInstr *MI, EqualityMap &EM) {
const MachineOperand &A = MI->getOperand(2); const MachineOperand &A = MI->getOperand(2);
if (!A.isImm() || A.getImm() != 0) if (!A.isImm() || A.getImm() != 0)
return false; return false;
LLVM_FALLTHROUGH;
} }
// Fall through.
case Hexagon::A2_tfr: { case Hexagon::A2_tfr: {
const MachineOperand &DstOp = MI->getOperand(0); const MachineOperand &DstOp = MI->getOperand(0);
const MachineOperand &SrcOp = MI->getOperand(1); const MachineOperand &SrcOp = MI->getOperand(1);

View File

@ -337,6 +337,7 @@ int32_t HexagonSplitDoubleRegs::profit(const MachineInstr *MI) const {
if (V == 0 || V == -1) if (V == 0 || V == -1)
return 10; return 10;
// Fall through into A2_combinew. // Fall through into A2_combinew.
LLVM_FALLTHROUGH;
} }
case Hexagon::A2_combinew: case Hexagon::A2_combinew:
return 2; return 2;

View File

@ -1606,7 +1606,7 @@ bool MipsAsmParser::processInstruction(MCInst &Inst, SMLoc IDLoc,
case Mips::BBIT1: case Mips::BBIT1:
case Mips::BBIT132: case Mips::BBIT132:
assert(hasCnMips() && "instruction only valid for octeon cpus"); assert(hasCnMips() && "instruction only valid for octeon cpus");
// Fall through LLVM_FALLTHROUGH;
case Mips::BEQ: case Mips::BEQ:
case Mips::BNE: case Mips::BNE:

View File

@ -2124,7 +2124,7 @@ NVPTXAsmPrinter::lowerConstantForGV(const Constant *CV, bool ProcessingGeneric)
// expression properly. This is important for differences between // expression properly. This is important for differences between
// blockaddress labels. Since the two labels are in the same function, it // blockaddress labels. Since the two labels are in the same function, it
// is reasonable to treat their delta as a 32-bit value. // is reasonable to treat their delta as a 32-bit value.
// FALL THROUGH. LLVM_FALLTHROUGH;
case Instruction::BitCast: case Instruction::BitCast:
return lowerConstantForGV(CE->getOperand(0), ProcessingGeneric); return lowerConstantForGV(CE->getOperand(0), ProcessingGeneric);

View File

@ -118,19 +118,19 @@ static SPCC::CondCodes GetOppositeBranchCondition(SPCC::CondCodes CC)
case SPCC::CPCC_A: return SPCC::CPCC_N; case SPCC::CPCC_A: return SPCC::CPCC_N;
case SPCC::CPCC_N: return SPCC::CPCC_A; case SPCC::CPCC_N: return SPCC::CPCC_A;
case SPCC::CPCC_3: // Fall through case SPCC::CPCC_3: LLVM_FALLTHROUGH;
case SPCC::CPCC_2: // Fall through case SPCC::CPCC_2: LLVM_FALLTHROUGH;
case SPCC::CPCC_23: // Fall through case SPCC::CPCC_23: LLVM_FALLTHROUGH;
case SPCC::CPCC_1: // Fall through case SPCC::CPCC_1: LLVM_FALLTHROUGH;
case SPCC::CPCC_13: // Fall through case SPCC::CPCC_13: LLVM_FALLTHROUGH;
case SPCC::CPCC_12: // Fall through case SPCC::CPCC_12: LLVM_FALLTHROUGH;
case SPCC::CPCC_123: // Fall through case SPCC::CPCC_123: LLVM_FALLTHROUGH;
case SPCC::CPCC_0: // Fall through case SPCC::CPCC_0: LLVM_FALLTHROUGH;
case SPCC::CPCC_03: // Fall through case SPCC::CPCC_03: LLVM_FALLTHROUGH;
case SPCC::CPCC_02: // Fall through case SPCC::CPCC_02: LLVM_FALLTHROUGH;
case SPCC::CPCC_023: // Fall through case SPCC::CPCC_023: LLVM_FALLTHROUGH;
case SPCC::CPCC_01: // Fall through case SPCC::CPCC_01: LLVM_FALLTHROUGH;
case SPCC::CPCC_013: // Fall through case SPCC::CPCC_013: LLVM_FALLTHROUGH;
case SPCC::CPCC_012: case SPCC::CPCC_012:
// "Opposite" code is not meaningful, as we don't know // "Opposite" code is not meaningful, as we don't know
// what the CoProc condition means here. The cond-code will // what the CoProc condition means here. The cond-code will

View File

@ -832,7 +832,7 @@ bool SystemZDAGToDAGISel::expandRxSBG(RxSBGOperands &RxSBG) const {
RxSBG.Input = N.getOperand(0); RxSBG.Input = N.getOperand(0);
return true; return true;
} }
// Fall through. LLVM_FALLTHROUGH;
case ISD::SIGN_EXTEND: { case ISD::SIGN_EXTEND: {
// Check that the extension bits are don't-care (i.e. are masked out // Check that the extension bits are don't-care (i.e. are masked out
@ -1265,7 +1265,7 @@ void SystemZDAGToDAGISel::Select(SDNode *Node) {
if (Node->getOperand(1).getOpcode() != ISD::Constant) if (Node->getOperand(1).getOpcode() != ISD::Constant)
if (tryRxSBG(Node, SystemZ::RNSBG)) if (tryRxSBG(Node, SystemZ::RNSBG))
return; return;
// Fall through. LLVM_FALLTHROUGH;
case ISD::ROTL: case ISD::ROTL:
case ISD::SHL: case ISD::SHL:
case ISD::SRL: case ISD::SRL:

View File

@ -382,7 +382,7 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VBLENDPDrri: case X86::VBLENDPDrri:
case X86::VBLENDPDYrri: case X86::VBLENDPDYrri:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::BLENDPDrmi: case X86::BLENDPDrmi:
case X86::VBLENDPDrmi: case X86::VBLENDPDrmi:
case X86::VBLENDPDYrmi: case X86::VBLENDPDYrmi:
@ -398,7 +398,7 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VBLENDPSrri: case X86::VBLENDPSrri:
case X86::VBLENDPSYrri: case X86::VBLENDPSYrri:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::BLENDPSrmi: case X86::BLENDPSrmi:
case X86::VBLENDPSrmi: case X86::VBLENDPSrmi:
case X86::VBLENDPSYrmi: case X86::VBLENDPSYrmi:
@ -414,7 +414,7 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VPBLENDWrri: case X86::VPBLENDWrri:
case X86::VPBLENDWYrri: case X86::VPBLENDWYrri:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::PBLENDWrmi: case X86::PBLENDWrmi:
case X86::VPBLENDWrmi: case X86::VPBLENDWrmi:
case X86::VPBLENDWYrmi: case X86::VPBLENDWYrmi:
@ -429,7 +429,7 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VPBLENDDrri: case X86::VPBLENDDrri:
case X86::VPBLENDDYrri: case X86::VPBLENDDYrri:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::VPBLENDDrmi: case X86::VPBLENDDrmi:
case X86::VPBLENDDYrmi: case X86::VPBLENDDYrmi:
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
@ -444,7 +444,7 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VINSERTPSrr: case X86::VINSERTPSrr:
case X86::VINSERTPSZrr: case X86::VINSERTPSZrr:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::INSERTPSrm: case X86::INSERTPSrm:
case X86::VINSERTPSrm: case X86::VINSERTPSrm:
case X86::VINSERTPSZrm: case X86::VINSERTPSZrm:
@ -507,7 +507,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_MOVDUP(MOVSLDUP, r) CASE_MOVDUP(MOVSLDUP, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_MOVDUP(MOVSLDUP, m) CASE_MOVDUP(MOVSLDUP, m)
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
DecodeMOVSLDUPMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask); DecodeMOVSLDUPMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask);
@ -515,7 +516,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_MOVDUP(MOVSHDUP, r) CASE_MOVDUP(MOVSHDUP, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_MOVDUP(MOVSHDUP, m) CASE_MOVDUP(MOVSHDUP, m)
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
DecodeMOVSHDUPMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask); DecodeMOVSHDUPMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask);
@ -523,7 +525,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_MOVDUP(MOVDDUP, r) CASE_MOVDUP(MOVDDUP, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_MOVDUP(MOVDDUP, m) CASE_MOVDUP(MOVDDUP, m)
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
DecodeMOVDDUPMask(getRegOperandVectorVT(MI, MVT::f64, 0), ShuffleMask); DecodeMOVDDUPMask(getRegOperandVectorVT(MI, MVT::f64, 0), ShuffleMask);
@ -566,7 +569,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_SHUF(PALIGNR, rri) CASE_SHUF(PALIGNR, rri)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_SHUF(PALIGNR, rmi) CASE_SHUF(PALIGNR, rmi)
Src2Name = getRegName(MI->getOperand(NumOperands-(RegForm?3:7)).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands-(RegForm?3:7)).getReg());
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
@ -578,7 +582,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_SHUF(PSHUFD, ri) CASE_SHUF(PSHUFD, ri)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_SHUF(PSHUFD, mi) CASE_SHUF(PSHUFD, mi)
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
@ -589,7 +594,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_SHUF(PSHUFHW, ri) CASE_SHUF(PSHUFHW, ri)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_SHUF(PSHUFHW, mi) CASE_SHUF(PSHUFHW, mi)
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
@ -600,7 +606,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_SHUF(PSHUFLW, ri) CASE_SHUF(PSHUFLW, ri)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_SHUF(PSHUFLW, mi) CASE_SHUF(PSHUFLW, mi)
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
@ -611,7 +618,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::MMX_PSHUFWri: case X86::MMX_PSHUFWri:
Src1Name = getRegName(MI->getOperand(1).getReg()); Src1Name = getRegName(MI->getOperand(1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::MMX_PSHUFWmi: case X86::MMX_PSHUFWmi:
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
@ -622,7 +630,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::PSWAPDrr: case X86::PSWAPDrr:
Src1Name = getRegName(MI->getOperand(1).getReg()); Src1Name = getRegName(MI->getOperand(1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::PSWAPDrm: case X86::PSWAPDrm:
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
DecodePSWAPMask(MVT::v2i32, ShuffleMask); DecodePSWAPMask(MVT::v2i32, ShuffleMask);
@ -632,7 +641,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::MMX_PUNPCKHBWirr: case X86::MMX_PUNPCKHBWirr:
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKHBW, m) CASE_UNPCK(PUNPCKHBW, m)
case X86::MMX_PUNPCKHBWirm: case X86::MMX_PUNPCKHBWirm:
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -644,7 +654,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::MMX_PUNPCKHWDirr: case X86::MMX_PUNPCKHWDirr:
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKHWD, m) CASE_UNPCK(PUNPCKHWD, m)
case X86::MMX_PUNPCKHWDirm: case X86::MMX_PUNPCKHWDirm:
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -656,7 +667,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::MMX_PUNPCKHDQirr: case X86::MMX_PUNPCKHDQirr:
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKHDQ, m) CASE_UNPCK(PUNPCKHDQ, m)
case X86::MMX_PUNPCKHDQirm: case X86::MMX_PUNPCKHDQirm:
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -667,7 +679,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_UNPCK(PUNPCKHQDQ, r) CASE_UNPCK(PUNPCKHQDQ, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKHQDQ, m) CASE_UNPCK(PUNPCKHQDQ, m)
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
@ -678,7 +691,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::MMX_PUNPCKLBWirr: case X86::MMX_PUNPCKLBWirr:
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKLBW, m) CASE_UNPCK(PUNPCKLBW, m)
case X86::MMX_PUNPCKLBWirm: case X86::MMX_PUNPCKLBWirm:
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -690,7 +704,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::MMX_PUNPCKLWDirr: case X86::MMX_PUNPCKLWDirr:
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKLWD, m) CASE_UNPCK(PUNPCKLWD, m)
case X86::MMX_PUNPCKLWDirm: case X86::MMX_PUNPCKLWDirm:
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -702,7 +717,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::MMX_PUNPCKLDQirr: case X86::MMX_PUNPCKLDQirr:
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKLDQ, m) CASE_UNPCK(PUNPCKLDQ, m)
case X86::MMX_PUNPCKLDQirm: case X86::MMX_PUNPCKLDQirm:
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -713,7 +729,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_UNPCK(PUNPCKLQDQ, r) CASE_UNPCK(PUNPCKLQDQ, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(PUNPCKLQDQ, m) CASE_UNPCK(PUNPCKLQDQ, m)
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());
@ -723,7 +740,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_SHUF(SHUFPD, rri) CASE_SHUF(SHUFPD, rri)
Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_SHUF(SHUFPD, rmi) CASE_SHUF(SHUFPD, rmi)
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
DecodeSHUFPMask(getRegOperandVectorVT(MI, MVT::f64, 0), DecodeSHUFPMask(getRegOperandVectorVT(MI, MVT::f64, 0),
@ -736,7 +754,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_SHUF(SHUFPS, rri) CASE_SHUF(SHUFPS, rri)
Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_SHUF(SHUFPS, rmi) CASE_SHUF(SHUFPS, rmi)
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
DecodeSHUFPMask(getRegOperandVectorVT(MI, MVT::f32, 0), DecodeSHUFPMask(getRegOperandVectorVT(MI, MVT::f32, 0),
@ -749,7 +768,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_VSHUF(64X2, r) CASE_VSHUF(64X2, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_VSHUF(64X2, m) CASE_VSHUF(64X2, m)
decodeVSHUF64x2FamilyMask(getRegOperandVectorVT(MI, MVT::i64, 0), decodeVSHUF64x2FamilyMask(getRegOperandVectorVT(MI, MVT::i64, 0),
MI->getOperand(NumOperands - 1).getImm(), MI->getOperand(NumOperands - 1).getImm(),
@ -761,7 +781,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_VSHUF(32X4, r) CASE_VSHUF(32X4, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_VSHUF(32X4, m) CASE_VSHUF(32X4, m)
decodeVSHUF64x2FamilyMask(getRegOperandVectorVT(MI, MVT::i32, 0), decodeVSHUF64x2FamilyMask(getRegOperandVectorVT(MI, MVT::i32, 0),
MI->getOperand(NumOperands - 1).getImm(), MI->getOperand(NumOperands - 1).getImm(),
@ -773,7 +794,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_UNPCK(UNPCKLPD, r) CASE_UNPCK(UNPCKLPD, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(UNPCKLPD, m) CASE_UNPCK(UNPCKLPD, m)
DecodeUNPCKLMask(getRegOperandVectorVT(MI, MVT::f64, 0), ShuffleMask); DecodeUNPCKLMask(getRegOperandVectorVT(MI, MVT::f64, 0), ShuffleMask);
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -783,7 +805,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_UNPCK(UNPCKLPS, r) CASE_UNPCK(UNPCKLPS, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(UNPCKLPS, m) CASE_UNPCK(UNPCKLPS, m)
DecodeUNPCKLMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask); DecodeUNPCKLMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask);
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -793,7 +816,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_UNPCK(UNPCKHPD, r) CASE_UNPCK(UNPCKHPD, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(UNPCKHPD, m) CASE_UNPCK(UNPCKHPD, m)
DecodeUNPCKHMask(getRegOperandVectorVT(MI, MVT::f64, 0), ShuffleMask); DecodeUNPCKHMask(getRegOperandVectorVT(MI, MVT::f64, 0), ShuffleMask);
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -803,7 +827,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_UNPCK(UNPCKHPS, r) CASE_UNPCK(UNPCKHPS, r)
Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src2Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
RegForm = true; RegForm = true;
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_UNPCK(UNPCKHPS, m) CASE_UNPCK(UNPCKHPS, m)
DecodeUNPCKHMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask); DecodeUNPCKHMask(getRegOperandVectorVT(MI, MVT::f32, 0), ShuffleMask);
Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands-(RegForm?2:6)).getReg());
@ -812,7 +837,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_VPERMILPI(PERMILPS, r) CASE_VPERMILPI(PERMILPS, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_VPERMILPI(PERMILPS, m) CASE_VPERMILPI(PERMILPS, m)
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
DecodePSHUFMask(getRegOperandVectorVT(MI, MVT::f32, 0), DecodePSHUFMask(getRegOperandVectorVT(MI, MVT::f32, 0),
@ -823,7 +849,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_VPERMILPI(PERMILPD, r) CASE_VPERMILPI(PERMILPD, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_VPERMILPI(PERMILPD, m) CASE_VPERMILPI(PERMILPD, m)
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
DecodePSHUFMask(getRegOperandVectorVT(MI, MVT::f64, 0), DecodePSHUFMask(getRegOperandVectorVT(MI, MVT::f64, 0),
@ -835,7 +862,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VPERM2F128rr: case X86::VPERM2F128rr:
case X86::VPERM2I128rr: case X86::VPERM2I128rr:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::VPERM2F128rm: case X86::VPERM2F128rm:
case X86::VPERM2I128rm: case X86::VPERM2I128rm:
// For instruction comments purpose, assume the 256-bit vector is v4i64. // For instruction comments purpose, assume the 256-bit vector is v4i64.
@ -849,7 +877,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_VPERM(PERMPD, r) CASE_VPERM(PERMPD, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_VPERM(PERMPD, m) CASE_VPERM(PERMPD, m)
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
DecodeVPERMMask(getRegOperandVectorVT(MI, MVT::f64, 0), DecodeVPERMMask(getRegOperandVectorVT(MI, MVT::f64, 0),
@ -860,7 +889,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_VPERM(PERMQ, r) CASE_VPERM(PERMQ, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 2).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_VPERM(PERMQ, m) CASE_VPERM(PERMQ, m)
if (MI->getOperand(NumOperands - 1).isImm()) if (MI->getOperand(NumOperands - 1).isImm())
DecodeVPERMMask(getRegOperandVectorVT(MI, MVT::i64, 0), DecodeVPERMMask(getRegOperandVectorVT(MI, MVT::i64, 0),
@ -874,7 +904,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VMOVSDZrr: case X86::VMOVSDZrr:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
Src1Name = getRegName(MI->getOperand(1).getReg()); Src1Name = getRegName(MI->getOperand(1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::MOVSDrm: case X86::MOVSDrm:
case X86::VMOVSDrm: case X86::VMOVSDrm:
case X86::VMOVSDZrm: case X86::VMOVSDZrm:
@ -887,7 +918,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VMOVSSZrr: case X86::VMOVSSZrr:
Src2Name = getRegName(MI->getOperand(2).getReg()); Src2Name = getRegName(MI->getOperand(2).getReg());
Src1Name = getRegName(MI->getOperand(1).getReg()); Src1Name = getRegName(MI->getOperand(1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::MOVSSrm: case X86::MOVSSrm:
case X86::VMOVSSrm: case X86::VMOVSSrm:
case X86::VMOVSSZrm: case X86::VMOVSSZrm:
@ -901,7 +933,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
case X86::VMOVZPQILo2PQIrr: case X86::VMOVZPQILo2PQIrr:
case X86::VMOVZPQILo2PQIZrr: case X86::VMOVZPQILo2PQIZrr:
Src1Name = getRegName(MI->getOperand(1).getReg()); Src1Name = getRegName(MI->getOperand(1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
case X86::MOVQI2PQIrm: case X86::MOVQI2PQIrm:
case X86::MOVZQI2PQIrm: case X86::MOVZQI2PQIrm:
case X86::MOVZPQILo2PQIrm: case X86::MOVZPQILo2PQIrm:
@ -954,7 +987,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_PMOVZX(PMOVZXBD, r) CASE_PMOVZX(PMOVZXBD, r)
CASE_PMOVZX(PMOVZXBQ, r) CASE_PMOVZX(PMOVZXBQ, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_PMOVZX(PMOVZXBW, m) CASE_PMOVZX(PMOVZXBW, m)
CASE_PMOVZX(PMOVZXBD, m) CASE_PMOVZX(PMOVZXBD, m)
CASE_PMOVZX(PMOVZXBQ, m) CASE_PMOVZX(PMOVZXBQ, m)
@ -965,7 +999,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_PMOVZX(PMOVZXWD, r) CASE_PMOVZX(PMOVZXWD, r)
CASE_PMOVZX(PMOVZXWQ, r) CASE_PMOVZX(PMOVZXWQ, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_PMOVZX(PMOVZXWD, m) CASE_PMOVZX(PMOVZXWD, m)
CASE_PMOVZX(PMOVZXWQ, m) CASE_PMOVZX(PMOVZXWQ, m)
DecodeZeroExtendMask(MVT::i16, getZeroExtensionResultType(MI), ShuffleMask); DecodeZeroExtendMask(MVT::i16, getZeroExtensionResultType(MI), ShuffleMask);
@ -974,7 +1009,8 @@ bool llvm::EmitAnyX86InstComments(const MCInst *MI, raw_ostream &OS,
CASE_PMOVZX(PMOVZXDQ, r) CASE_PMOVZX(PMOVZXDQ, r)
Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg()); Src1Name = getRegName(MI->getOperand(NumOperands - 1).getReg());
// FALL THROUGH. LLVM_FALLTHROUGH;
CASE_PMOVZX(PMOVZXDQ, m) CASE_PMOVZX(PMOVZXDQ, m)
DecodeZeroExtendMask(MVT::i32, getZeroExtensionResultType(MI), ShuffleMask); DecodeZeroExtendMask(MVT::i32, getZeroExtensionResultType(MI), ShuffleMask);
DestName = getRegName(MI->getOperand(0).getReg()); DestName = getRegName(MI->getOperand(0).getReg());

View File

@ -2969,7 +2969,7 @@ bool X86FastISel::fastLowerArguments() {
default: llvm_unreachable("Unexpected value type."); default: llvm_unreachable("Unexpected value type.");
case MVT::i32: SrcReg = GPR32ArgRegs[GPRIdx++]; break; case MVT::i32: SrcReg = GPR32ArgRegs[GPRIdx++]; break;
case MVT::i64: SrcReg = GPR64ArgRegs[GPRIdx++]; break; case MVT::i64: SrcReg = GPR64ArgRegs[GPRIdx++]; break;
case MVT::f32: // fall-through case MVT::f32: LLVM_FALLTHROUGH;
case MVT::f64: SrcReg = XMMArgRegs[FPRIdx++]; break; case MVT::f64: SrcReg = XMMArgRegs[FPRIdx++]; break;
} }
unsigned DstReg = FuncInfo.MF->addLiveIn(SrcReg, RC); unsigned DstReg = FuncInfo.MF->addLiveIn(SrcReg, RC);
@ -3508,7 +3508,7 @@ unsigned X86FastISel::X86MaterializeInt(const ConstantInt *CI, MVT VT) {
unsigned Opc = 0; unsigned Opc = 0;
switch (VT.SimpleTy) { switch (VT.SimpleTy) {
default: llvm_unreachable("Unexpected value type"); default: llvm_unreachable("Unexpected value type");
case MVT::i1: VT = MVT::i8; // fall-through case MVT::i1: VT = MVT::i8; LLVM_FALLTHROUGH;
case MVT::i8: Opc = X86::MOV8ri; break; case MVT::i8: Opc = X86::MOV8ri; break;
case MVT::i16: Opc = X86::MOV16ri; break; case MVT::i16: Opc = X86::MOV16ri; break;
case MVT::i32: Opc = X86::MOV32ri; break; case MVT::i32: Opc = X86::MOV32ri; break;

View File

@ -1234,7 +1234,7 @@ bool X86DAGToDAGISel::matchAddressRecursively(SDValue N, X86ISelAddressMode &AM,
case ISD::UMUL_LOHI: case ISD::UMUL_LOHI:
// A mul_lohi where we need the low part can be folded as a plain multiply. // A mul_lohi where we need the low part can be folded as a plain multiply.
if (N.getResNo() != 0) break; if (N.getResNo() != 0) break;
// FALL THROUGH LLVM_FALLTHROUGH;
case ISD::MUL: case ISD::MUL:
case X86ISD::MUL_IMM: case X86ISD::MUL_IMM:
// X*[3,5,9] -> X+X*[2,4,8] // X*[3,5,9] -> X+X*[2,4,8]

View File

@ -15028,7 +15028,7 @@ SDValue X86TargetLowering::EmitTest(SDValue Op, unsigned X86CC, const SDLoc &dl,
if (!Subtarget.hasBMI() || !isAndn || !isLegalAndnType) if (!Subtarget.hasBMI() || !isAndn || !isLegalAndnType)
break; break;
} }
// FALL THROUGH LLVM_FALLTHROUGH;
case ISD::SUB: case ISD::SUB:
case ISD::OR: case ISD::OR:
case ISD::XOR: case ISD::XOR:
@ -27635,7 +27635,7 @@ static SDValue checkBoolTestSetCCCombine(SDValue Cmp, X86::CondCode &CC) {
break; break;
assert(X86::CondCode(SetCC.getConstantOperandVal(0)) == X86::COND_B && assert(X86::CondCode(SetCC.getConstantOperandVal(0)) == X86::COND_B &&
"Invalid use of SETCC_CARRY!"); "Invalid use of SETCC_CARRY!");
// FALL THROUGH LLVM_FALLTHROUGH;
case X86ISD::SETCC: case X86ISD::SETCC:
// Set the condition code or opposite one if necessary. // Set the condition code or opposite one if necessary.
CC = X86::CondCode(SetCC.getConstantOperandVal(0)); CC = X86::CondCode(SetCC.getConstantOperandVal(0));
@ -32229,7 +32229,7 @@ X86TargetLowering::getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI,
return std::make_pair(0U, &X86::VR64RegClass); return std::make_pair(0U, &X86::VR64RegClass);
case 'Y': // SSE_REGS if SSE2 allowed case 'Y': // SSE_REGS if SSE2 allowed
if (!Subtarget.hasSSE2()) break; if (!Subtarget.hasSSE2()) break;
// FALL THROUGH. LLVM_FALLTHROUGH;
case 'x': // SSE_REGS if SSE1 allowed or AVX_REGS if AVX allowed case 'x': // SSE_REGS if SSE1 allowed or AVX_REGS if AVX allowed
if (!Subtarget.hasSSE1()) break; if (!Subtarget.hasSSE1()) break;

View File

@ -225,6 +225,7 @@ void X86WinAllocaExpander::lower(MachineInstr* MI, Lowering L) {
break; break;
// Fall through to make any remaining adjustment. // Fall through to make any remaining adjustment.
LLVM_FALLTHROUGH;
case Sub: case Sub:
assert(Amount > 0); assert(Amount > 0);
if (Amount == SlotSize) { if (Amount == SlotSize) {

View File

@ -140,7 +140,7 @@ void XCoreAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() || if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage() ||
GV->hasCommonLinkage()) GV->hasCommonLinkage())
OutStreamer->EmitSymbolAttribute(GVSym, MCSA_Weak); OutStreamer->EmitSymbolAttribute(GVSym, MCSA_Weak);
// FALL THROUGH LLVM_FALLTHROUGH;
case GlobalValue::InternalLinkage: case GlobalValue::InternalLinkage:
case GlobalValue::PrivateLinkage: case GlobalValue::PrivateLinkage:
break; break;

View File

@ -775,7 +775,8 @@ static bool isFunctionMallocLike(Function *F, const SCCNodeSet &SCCNodes) {
break; break;
if (CS.getCalledFunction() && SCCNodes.count(CS.getCalledFunction())) if (CS.getCalledFunction() && SCCNodes.count(CS.getCalledFunction()))
break; break;
} // fall-through LLVM_FALLTHROUGH;
}
default: default:
return false; // Did not come from an allocation. return false; // Did not come from an allocation.
} }

View File

@ -828,6 +828,7 @@ int FunctionComparator::cmpTypes(Type *TyL, Type *TyR) const {
default: default:
llvm_unreachable("Unknown type!"); llvm_unreachable("Unknown type!");
// Fall through in Release mode. // Fall through in Release mode.
LLVM_FALLTHROUGH;
case Type::IntegerTyID: case Type::IntegerTyID:
return cmpNumbers(cast<IntegerType>(TyL)->getBitWidth(), return cmpNumbers(cast<IntegerType>(TyL)->getBitWidth(),
cast<IntegerType>(TyR)->getBitWidth()); cast<IntegerType>(TyR)->getBitWidth());

View File

@ -1473,7 +1473,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
II->setArgOperand(1, LHS); II->setArgOperand(1, LHS);
return II; return II;
} }
// fall through LLVM_FALLTHROUGH;
case Intrinsic::usub_with_overflow: case Intrinsic::usub_with_overflow:
case Intrinsic::ssub_with_overflow: { case Intrinsic::ssub_with_overflow: {

View File

@ -2715,8 +2715,10 @@ bool InstCombiner::OptimizeOverflowCheck(OverflowCheckFlavor OCF, Value *LHS,
if (OR == OverflowResult::AlwaysOverflows) if (OR == OverflowResult::AlwaysOverflows)
return SetResult(Builder->CreateAdd(LHS, RHS), Builder->getTrue(), true); return SetResult(Builder->CreateAdd(LHS, RHS), Builder->getTrue(), true);
// Fall through uadd into sadd
LLVM_FALLTHROUGH;
} }
// FALL THROUGH uadd into sadd
case OCF_SIGNED_ADD: { case OCF_SIGNED_ADD: {
// X + 0 -> {X, false} // X + 0 -> {X, false}
if (match(RHS, m_Zero())) if (match(RHS, m_Zero()))
@ -2756,7 +2758,8 @@ bool InstCombiner::OptimizeOverflowCheck(OverflowCheckFlavor OCF, Value *LHS,
true); true);
if (OR == OverflowResult::AlwaysOverflows) if (OR == OverflowResult::AlwaysOverflows)
return SetResult(Builder->CreateMul(LHS, RHS), Builder->getTrue(), true); return SetResult(Builder->CreateMul(LHS, RHS), Builder->getTrue(), true);
} // FALL THROUGH LLVM_FALLTHROUGH;
}
case OCF_SIGNED_MUL: case OCF_SIGNED_MUL:
// X * undef -> undef // X * undef -> undef
if (isa<UndefValue>(RHS)) if (isa<UndefValue>(RHS))
@ -3311,28 +3314,28 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) {
case ICmpInst::ICMP_UGT: case ICmpInst::ICMP_UGT:
std::swap(Op0, Op1); // Change icmp ugt -> icmp ult std::swap(Op0, Op1); // Change icmp ugt -> icmp ult
// FALL THROUGH LLVM_FALLTHROUGH;
case ICmpInst::ICMP_ULT:{ // icmp ult i1 A, B -> ~A & B case ICmpInst::ICMP_ULT:{ // icmp ult i1 A, B -> ~A & B
Value *Not = Builder->CreateNot(Op0, I.getName() + "tmp"); Value *Not = Builder->CreateNot(Op0, I.getName() + "tmp");
return BinaryOperator::CreateAnd(Not, Op1); return BinaryOperator::CreateAnd(Not, Op1);
} }
case ICmpInst::ICMP_SGT: case ICmpInst::ICMP_SGT:
std::swap(Op0, Op1); // Change icmp sgt -> icmp slt std::swap(Op0, Op1); // Change icmp sgt -> icmp slt
// FALL THROUGH LLVM_FALLTHROUGH;
case ICmpInst::ICMP_SLT: { // icmp slt i1 A, B -> A & ~B case ICmpInst::ICMP_SLT: { // icmp slt i1 A, B -> A & ~B
Value *Not = Builder->CreateNot(Op1, I.getName() + "tmp"); Value *Not = Builder->CreateNot(Op1, I.getName() + "tmp");
return BinaryOperator::CreateAnd(Not, Op0); return BinaryOperator::CreateAnd(Not, Op0);
} }
case ICmpInst::ICMP_UGE: case ICmpInst::ICMP_UGE:
std::swap(Op0, Op1); // Change icmp uge -> icmp ule std::swap(Op0, Op1); // Change icmp uge -> icmp ule
// FALL THROUGH LLVM_FALLTHROUGH;
case ICmpInst::ICMP_ULE: { // icmp ule i1 A, B -> ~A | B case ICmpInst::ICMP_ULE: { // icmp ule i1 A, B -> ~A | B
Value *Not = Builder->CreateNot(Op0, I.getName() + "tmp"); Value *Not = Builder->CreateNot(Op0, I.getName() + "tmp");
return BinaryOperator::CreateOr(Not, Op1); return BinaryOperator::CreateOr(Not, Op1);
} }
case ICmpInst::ICMP_SGE: case ICmpInst::ICMP_SGE:
std::swap(Op0, Op1); // Change icmp sge -> icmp sle std::swap(Op0, Op1); // Change icmp sge -> icmp sle
// FALL THROUGH LLVM_FALLTHROUGH;
case ICmpInst::ICMP_SLE: { // icmp sle i1 A, B -> A | ~B case ICmpInst::ICMP_SLE: { // icmp sle i1 A, B -> A | ~B
Value *Not = Builder->CreateNot(Op1, I.getName() + "tmp"); Value *Not = Builder->CreateNot(Op1, I.getName() + "tmp");
return BinaryOperator::CreateOr(Not, Op0); return BinaryOperator::CreateOr(Not, Op0);

View File

@ -457,9 +457,9 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, Constant *Op1,
V1->getName()+".mask"); V1->getName()+".mask");
return BinaryOperator::Create(Op0BO->getOpcode(), YS, XM); return BinaryOperator::Create(Op0BO->getOpcode(), YS, XM);
} }
LLVM_FALLTHROUGH;
} }
// FALL THROUGH.
case Instruction::Sub: { case Instruction::Sub: {
// Turn ((X >> C) + Y) << C -> (X + (Y << C)) & (~0 << C) // Turn ((X >> C) + Y) << C -> (X + (Y << C)) & (~0 << C)
if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() && if (isLeftShift && Op0BO->getOperand(0)->hasOneUse() &&

View File

@ -1983,8 +1983,8 @@ isAllocSiteRemovable(Instruction *AI, SmallVectorImpl<WeakVH> &Users,
MemIntrinsic *MI = cast<MemIntrinsic>(II); MemIntrinsic *MI = cast<MemIntrinsic>(II);
if (MI->isVolatile() || MI->getRawDest() != PI) if (MI->isVolatile() || MI->getRawDest() != PI)
return false; return false;
LLVM_FALLTHROUGH;
} }
// fall through
case Intrinsic::dbg_declare: case Intrinsic::dbg_declare:
case Intrinsic::dbg_value: case Intrinsic::dbg_value:
case Intrinsic::invariant_start: case Intrinsic::invariant_start:

View File

@ -201,7 +201,7 @@ bool BottomUpPtrState::MatchWithRetain() {
// imprecise release, clear our reverse insertion points. // imprecise release, clear our reverse insertion points.
if (OldSeq != S_Use || IsTrackingImpreciseReleases()) if (OldSeq != S_Use || IsTrackingImpreciseReleases())
ClearReverseInsertPts(); ClearReverseInsertPts();
// FALL THROUGH LLVM_FALLTHROUGH;
case S_CanRelease: case S_CanRelease:
return true; return true;
case S_None: case S_None:
@ -332,7 +332,7 @@ bool TopDownPtrState::MatchWithRelease(ARCMDKindCache &Cache,
case S_CanRelease: case S_CanRelease:
if (OldSeq == S_Retain || ReleaseMetadata != nullptr) if (OldSeq == S_Retain || ReleaseMetadata != nullptr)
ClearReverseInsertPts(); ClearReverseInsertPts();
// FALL THROUGH LLVM_FALLTHROUGH;
case S_Use: case S_Use:
SetReleaseMetadata(ReleaseMetadata); SetReleaseMetadata(ReleaseMetadata);
SetTailCallRelease(cast<CallInst>(Release)->isTailCall()); SetTailCallRelease(cast<CallInst>(Release)->isTailCall());

View File

@ -599,7 +599,7 @@ int main(int argc, char **argv) {
} }
errs() errs()
<< "llvm-config: error: component libraries and shared library\n\n"; << "llvm-config: error: component libraries and shared library\n\n";
// fall through LLVM_FALLTHROUGH;
case LinkModeStatic: case LinkModeStatic:
for (auto &Lib : MissingLibs) for (auto &Lib : MissingLibs)
errs() << "llvm-config: error: missing: " << Lib << "\n"; errs() << "llvm-config: error: missing: " << Lib << "\n";

View File

@ -66,7 +66,7 @@ static bool PrintInsts(const MCDisassembler &DisAsm,
SM.PrintMessage(SMLoc::getFromPointer(Bytes.second[Index]), SM.PrintMessage(SMLoc::getFromPointer(Bytes.second[Index]),
SourceMgr::DK_Warning, SourceMgr::DK_Warning,
"potentially undefined instruction encoding"); "potentially undefined instruction encoding");
// Fall through LLVM_FALLTHROUGH;
case MCDisassembler::Success: case MCDisassembler::Success:
Streamer.EmitInstruction(Inst, STI); Streamer.EmitInstruction(Inst, STI);

View File

@ -287,10 +287,10 @@ static void EncodeFixedType(Record *R, std::vector<unsigned char> &ArgCodes,
unsigned Tmp = 0; unsigned Tmp = 0;
switch (VT) { switch (VT) {
default: break; default: break;
case MVT::iPTRAny: ++Tmp; // FALL THROUGH. case MVT::iPTRAny: ++Tmp; LLVM_FALLTHROUGH;
case MVT::vAny: ++Tmp; // FALL THROUGH. case MVT::vAny: ++Tmp; LLVM_FALLTHROUGH;
case MVT::fAny: ++Tmp; // FALL THROUGH. case MVT::fAny: ++Tmp; LLVM_FALLTHROUGH;
case MVT::iAny: ++Tmp; // FALL THROUGH. case MVT::iAny: ++Tmp; LLVM_FALLTHROUGH;
case MVT::Any: { case MVT::Any: {
// If this is an "any" valuetype, then the type is the type of the next // If this is an "any" valuetype, then the type is the type of the next
// type in the list specified to getIntrinsic(). // type in the list specified to getIntrinsic().