reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

include/llvm/Analysis/AliasAnalysis.h
  730     switch (I->getOpcode()) {
include/llvm/Analysis/MemoryLocation.h
  208     switch (Inst->getOpcode()) {
include/llvm/CodeGen/TargetLowering.h
 2350     switch (I->getOpcode()) {
include/llvm/IR/CallSite.h
   75       if (II->getOpcode() == Instruction::Call)
   77       if (II->getOpcode() == Instruction::Invoke)
   79       if (II->getOpcode() == Instruction::CallBr)
include/llvm/IR/InstVisitor.h
  121     switch (I.getOpcode()) {
include/llvm/IR/InstrTypes.h
   81            I->getOpcode() == Instruction::Alloca ||
   82            I->getOpcode() == Instruction::Load ||
   83            I->getOpcode() == Instruction::VAArg ||
   84            I->getOpcode() == Instruction::ExtractValue ||
   85            (I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd);
   85            (I->getOpcode() >= CastOpsBegin && I->getOpcode() < CastOpsEnd);
  172     return static_cast<UnaryOps>(Instruction::getOpcode());
  403     return static_cast<BinaryOps>(Instruction::getOpcode());
  693     return Instruction::CastOps(Instruction::getOpcode());
  803     return static_cast<OtherOps>(Instruction::getOpcode());
  967     return I->getOpcode() == Instruction::ICmp ||
  968            I->getOpcode() == Instruction::FCmp;
 1122     switch (getOpcode()) {
 1141     return I->getOpcode() == Instruction::Call ||
 1142            I->getOpcode() == Instruction::Invoke ||
 1143            I->getOpcode() == Instruction::CallBr;
include/llvm/IR/Instruction.h
  127   const char *getOpcodeName() const { return getOpcodeName(getOpcode()); }
  128   bool isTerminator() const { return isTerminator(getOpcode()); }
  129   bool isUnaryOp() const { return isUnaryOp(getOpcode()); }
  130   bool isBinaryOp() const { return isBinaryOp(getOpcode()); }
  131   bool isIntDivRem() const { return isIntDivRem(getOpcode()); }
  132   bool isShift() { return isShift(getOpcode()); }
  133   bool isCast() const { return isCast(getOpcode()); }
  134   bool isFuncletPad() const { return isFuncletPad(getOpcode()); }
  136     return isExceptionalTerminator(getOpcode());
  139     return isIndirectTerminator(getOpcode());
  166     return getOpcode() == Shl || getOpcode() == LShr;
  166     return getOpcode() == Shl || getOpcode() == LShr;
  171     return getOpcode() == AShr;
  181     return isBitwiseLogicOp(getOpcode());
  498   bool isCommutative() const { return isCommutative(getOpcode()); }
  516   bool isIdempotent() const { return isIdempotent(getOpcode()); }
  530   bool isNilpotent() const { return isNilpotent(getOpcode()); }
  562     switch (getOpcode()) {
  594     switch (getOpcode()) {
include/llvm/IR/Instructions.h
  149     return (I->getOpcode() == Instruction::Alloca);
  301     return I->getOpcode() == Instruction::Load;
  430     return I->getOpcode() == Instruction::Store;
  507     return I->getOpcode() == Instruction::Fence;
  665     return I->getOpcode() == Instruction::AtomicCmpXchg;
  837     return I->getOpcode() == Instruction::AtomicRMW;
 1102     return (I->getOpcode() == Instruction::GetElementPtr);
 1279     return I->getOpcode() == Instruction::ICmp;
 1387     return I->getOpcode() == Instruction::FCmp;
 1670     return I->getOpcode() == Instruction::Call;
 1785     return static_cast<OtherOps>(Instruction::getOpcode());
 1790     return I->getOpcode() == Instruction::Select;
 1836     return I->getOpcode() == VAArg;
 1893     return I->getOpcode() == Instruction::ExtractElement;
 1956     return I->getOpcode() == Instruction::InsertElement;
 2271     return I->getOpcode() == Instruction::ShuffleVector;
 2371     return I->getOpcode() == Instruction::ExtractValue;
 2502     return I->getOpcode() == Instruction::InsertValue;
 2763     return I->getOpcode() == Instruction::PHI;
 2872     return I->getOpcode() == Instruction::LandingPad;
 2946     return (I->getOpcode() == Instruction::Ret);
 3099     return (I->getOpcode() == Instruction::Br);
 3456     return I->getOpcode() == Instruction::Switch;
 3636     return I->getOpcode() == Instruction::IndirectBr;
 3874     return (I->getOpcode() == Instruction::Invoke);
 4114     return (I->getOpcode() == Instruction::CallBr);
 4193     return I->getOpcode() == Instruction::Resume;
 4378     return I->getOpcode() == Instruction::CatchSwitch;
 4424     return I->getOpcode() == Instruction::CleanupPad;
 4474     return I->getOpcode() == Instruction::CatchPad;
 4538     return (I->getOpcode() == Instruction::CatchRet);
 4632     return (I->getOpcode() == Instruction::CleanupRet);
 4691     return I->getOpcode() == Instruction::Unreachable;
 4739     return I->getOpcode() == Trunc;
 4778     return I->getOpcode() == ZExt;
 4817     return I->getOpcode() == SExt;
 4856     return I->getOpcode() == FPTrunc;
 4895     return I->getOpcode() == FPExt;
 4934     return I->getOpcode() == UIToFP;
 4973     return I->getOpcode() == SIToFP;
 5012     return I->getOpcode() == FPToUI;
 5051     return I->getOpcode() == FPToSI;
 5094     return I->getOpcode() == IntToPtr;
 5145     return I->getOpcode() == PtrToInt;
 5184     return I->getOpcode() == BitCast;
 5224     return I->getOpcode() == AddrSpaceCast;
include/llvm/IR/Operator.h
   42       return I->getOpcode();
   50       return I->getOpcode();
  100     return I->getOpcode() == Instruction::Add ||
  101            I->getOpcode() == Instruction::Sub ||
  102            I->getOpcode() == Instruction::Mul ||
  103            I->getOpcode() == Instruction::Shl;
  150     return isPossiblyExactOpcode(I->getOpcode());
  375       Opcode = I->getOpcode();
  410     return I->getOpcode() == Opc;
include/llvm/IR/PatternMatch.h
 1012       return this->isOpType(I->getOpcode()) && L.match(I->getOperand(0)) &&
lib/Analysis/BranchProbabilityInfo.cpp
  552         CmpLHSConst = ConstantExpr::get(I->getOpcode(), CmpLHSConst,
  684     if (LHS->getOpcode() == Instruction::And)
lib/Analysis/CaptureTracking.cpp
  254     switch (I->getOpcode()) {
lib/Analysis/ConstantFolding.cpp
 1199   return ConstantFoldInstOperandsImpl(I, I->getOpcode(), Ops, DL, TLI);
lib/Analysis/DemandedBits.cpp
  113   switch (UserI->getOpcode()) {
lib/Analysis/IVDescriptors.cpp
  563   switch (I->getOpcode()) {
lib/Analysis/InstructionSimplify.cpp
  378     if (Simplified && Simplified->getOpcode() == unsigned(Opcode)) {
 5243   switch (I->getOpcode()) {
 5381         SimplifyCastInst(I->getOpcode(), I->getOperand(0), I->getType(), Q);
lib/Analysis/LazyValueInfo.cpp
  578   switch (BBI->getOpcode()) {
lib/Analysis/LoopInfo.cpp
  161           if (Inc->getOpcode() == Instruction::Add && Inc->getOperand(0) == PN)
lib/Analysis/ObjCARCInstKind.cpp
  221     switch (I->getOpcode()) {
lib/Analysis/PHITransAddr.cpp
   34   if (Inst->getOpcode() == Instruction::Add &&
  253   if (Inst->getOpcode() == Instruction::Add &&
lib/Analysis/ScalarEvolution.cpp
 4349       switch (I->getOpcode()) {
lib/Analysis/ScalarEvolutionExpander.cpp
  204       if (IP->getOpcode() == (unsigned)Opcode && IP->getOperand(0) == LHS &&
  535         if (IP->getOpcode() == Instruction::GetElementPtr &&
  940   switch (IncV->getOpcode()) {
lib/Analysis/StackSafetyAnalysis.cpp
  293       switch (I->getOpcode()) {
lib/Analysis/TargetTransformInfo.cpp
  604   assert ((I == nullptr || I->getOpcode() == Opcode) &&
  627   assert ((I == nullptr || I->getOpcode() == Opcode) &&
  645   assert ((I == nullptr || I->getOpcode() == Opcode) &&
  897     return ReductionData(RK_Arithmetic, I->getOpcode(), L, R);
 1145   switch (I->getOpcode()) {
 1152     return getCFInstrCost(I->getOpcode());
 1177     return getArithmeticInstrCost(I->getOpcode(), I->getType(), Op1VK, Op2VK,
 1187     return getArithmeticInstrCost(I->getOpcode(), I->getType(), Op1VK, Op2VK,
 1193     return getCmpSelInstrCost(I->getOpcode(), I->getType(), CondTy, I);
 1198     return getCmpSelInstrCost(I->getOpcode(), ValTy, I->getType(), I);
 1203     return getMemoryOpCost(I->getOpcode(), ValTy,
 1209     return getMemoryOpCost(I->getOpcode(), I->getType(),
 1227     return getCastInstrCost(I->getOpcode(), I->getType(), SrcTy, I);
 1273     return getVectorInstrCost(I->getOpcode(),
 1282     return getVectorInstrCost(I->getOpcode(),
lib/Analysis/ValueTracking.cpp
 3115     switch (Inst->getOpcode()) {
 4322   switch (I->getOpcode()) {
 4354   switch (I->getOpcode()) {
lib/Bitcode/Writer/BitcodeWriter.cpp
 2606   switch (I.getOpcode()) {
 2608     if (Instruction::isCast(I.getOpcode())) {
 2613       Vals.push_back(getEncodedCastOpcode(I.getOpcode()));
 2620       Vals.push_back(getEncodedBinaryOpcode(I.getOpcode()));
 2633     Vals.push_back(getEncodedUnaryOpcode(I.getOpcode()));
lib/CodeGen/CodeGenPrepare.cpp
 1508     if (User->getOpcode() != Instruction::And ||
 1540     int ISDOpcode = TLI.InstructionOpcodeToISD(TruncUser->getOpcode());
 3538   switch (I->getOpcode()) {
 3573   int ISDOpcode = TLI.InstructionOpcodeToISD(PromotedInst->getOpcode());
 3745   if ((Inst->getOpcode() == Instruction::And ||
 3746        Inst->getOpcode() == Instruction::Or))
 3750   if (Inst->getOpcode() == Instruction::Xor) {
 3762   if (Inst->getOpcode() == Instruction::LShr && !IsSExt)
 3770   if (Inst->getOpcode() == Instruction::Shl && Inst->hasOneUse()) {
 3774       if (AndInst && AndInst->getOpcode() == Instruction::And) {
 4331     if (matchOperationAddr(I, I->getOpcode(), Depth, &MovedAway)) {
 5738     switch (I->getOpcode()) {
 6377         TTI.getVectorInstrCost(Transition->getOpcode(), PromotedType, Index);
 6394           Inst->getOpcode(), Inst->getType(), Arg0OVK, Arg1OVK);
 6395       VectorCost += TTI.getArithmeticInstrCost(Inst->getOpcode(), PromotedType,
 6447     switch (Use->getOpcode()) {
 6497     int ISDOpcode = TLI.InstructionOpcodeToISD(ToBePromoted->getOpcode());
 7046   switch (I->getOpcode()) {
lib/CodeGen/GlobalISel/IRTranslator.cpp
 2099   switch (Inst.getOpcode()) {
lib/CodeGen/SafeStack.cpp
  294       switch (I->getOpcode()) {
lib/CodeGen/SelectionDAG/FastISel.cpp
  356          !(I->getOpcode() == Instruction::BitCast ||
  357            I->getOpcode() == Instruction::PtrToInt ||
  358            I->getOpcode() == Instruction::IntToPtr) &&
 1634     if (selectOperator(I, I->getOpcode())) {
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
 1090   visit(I.getOpcode(), I);
 2096     BOpc = BOp->getOpcode();
 2983   auto OpCode = Inst->getOpcode();
 3042       if (Inst->getOpcode() == OpCode || isa<PHINode>(U)) {
 3075         if (!U2 || U2->getOpcode() != OpCode)
lib/CodeGen/StackProtector.cpp
  162     switch (I->getOpcode()) {
lib/ExecutionEngine/Interpreter/Execution.cpp
 1040   if (I.getOpcode() == Instruction::Alloca)
lib/FuzzMutate/RandomIRBuilder.cpp
   74   switch (I->getOpcode()) {
lib/IR/Core.cpp
 2755     return map_to_llvmopcode(C->getOpcode());
lib/IR/Instruction.cpp
  121   switch (getOpcode()) {
  381   assert(I1->getOpcode() == I2->getOpcode() &&
  381   assert(I1->getOpcode() == I2->getOpcode() &&
  446   if (getOpcode() != I->getOpcode() ||
  446   if (getOpcode() != I->getOpcode() ||
  476   if (getOpcode() != I->getOpcode() ||
  476   if (getOpcode() != I->getOpcode() ||
  514   switch (getOpcode()) {
  534   switch (getOpcode()) {
  554   switch (getOpcode()) {
  570   switch (getOpcode()) {
  582   switch (getOpcode()) {
  630   unsigned Opcode = getOpcode();
  645   switch (getOpcode()) {
  657   switch (getOpcode()) {
  669   switch (getOpcode()) {
  731   switch (getOpcode()) {
lib/IR/Instructions.cpp
  262   assert(getOpcode() == Instruction::CallBr && "Unexpected opcode!");
 1083     : Instruction(FPI.getType(), FPI.getOpcode(),
lib/IR/Metadata.cpp
 1314       (getOpcode() == Instruction::Br || getOpcode() == Instruction::Select) &&
 1314       (getOpcode() == Instruction::Br || getOpcode() == Instruction::Select) &&
 1337   assert((getOpcode() == Instruction::Br ||
 1338           getOpcode() == Instruction::Select ||
 1339           getOpcode() == Instruction::Call ||
 1340           getOpcode() == Instruction::Invoke ||
 1341           getOpcode() == Instruction::Switch) &&
lib/Target/AArch64/AArch64FastISel.cpp
  588       Opcode = I->getOpcode();
  934     Opcode = I->getOpcode();
 1928     return selectOperator(I, I->getOpcode());
 1931   switch (I->getOpcode()) {
 1954     return selectOperator(I, I->getOpcode());
 1957   switch (I->getOpcode()) {
 4757     return selectOperator(I, I->getOpcode());
 4763     bool IsZExt = I->getOpcode() != Instruction::AShr;
 4790     switch (I->getOpcode()) {
 4820   switch (I->getOpcode()) {
 5150   switch (I->getOpcode()) {
 5227   return selectOperator(I, I->getOpcode());
lib/Target/AArch64/AArch64ISelLowering.cpp
 8513   if (I->getOpcode() != Instruction::FMul)
 8522       !(User->getOpcode() == Instruction::FSub ||
 8523         User->getOpcode() == Instruction::FAdd))
 8584     switch (Instr->getOpcode()) {
 8700   switch (I->getOpcode()) {
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  272     if (isWideningInstruction(Dst, SingleUser->getOpcode(), Operands)) {
  281         if (I->getOpcode() == unsigned(Cast->getOpcode()) &&
lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
  247   switch (I.getOpcode()) {
  261   switch (I.getOpcode()) {
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  329   switch (Inst->getOpcode()) {
  423     switch (Inst->getOpcode()) {
  539     if (UseInst->getOpcode() == Instruction::PtrToInt)
  574     if (UseInst->getOpcode() == Instruction::AddrSpaceCast) {
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  704     return getVectorInstrCost(EE->getOpcode(), EE->getOperand(0)->getType(),
  714     return getVectorInstrCost(IE->getOpcode(), IE->getType(), Idx);
lib/Target/ARM/ARMCodeGenPrepare.cpp
  185   unsigned Opc = cast<Instruction>(V)->getOpcode();
  341   unsigned Opc = I->getOpcode();
  432   switch(I->getOpcode()) {
  479     if (I->getOpcode() != Instruction::Add)
  806     switch (I->getOpcode()) {
  866   if (I->getOpcode() != Instruction::Add && I->getOpcode() != Instruction::Sub)
  866   if (I->getOpcode() != Instruction::Add && I->getOpcode() != Instruction::Sub)
lib/Target/ARM/ARMFastISel.cpp
  722       Opcode = I->getOpcode();
 2820   switch (I->getOpcode()) {
lib/Target/ARM/ARMISelLowering.cpp
14757     switch (I->getOpcode()) {
14775     switch (I->getOpcode()) {
lib/Target/ARM/ARMParallelDSP.cpp
  104             if (I->getOpcode() == Instruction::Mul)
  107           if (I->getOpcode() == Instruction::Mul)
  450   switch (I->getOpcode()) {
  522       if (I.getOpcode() != Instruction::Add)
lib/Target/ARM/ARMTargetTransformInfo.cpp
  876     unsigned ISD = TLI->InstructionOpcodeToISD(I.getOpcode());
  893     switch (I.getOpcode()) {
  931       switch (I.getOpcode()) {
lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
  980   switch (In->getOpcode()) {
 1186   if (UseI->getOpcode() == Instruction::Select) {
 1234   switch (I->getOpcode()) {
 1269     switch (I->getOpcode()) {
 1286   unsigned Opc = I->getOpcode();
 1569   switch (I->getOpcode()) {
 1589       if (I->getOpcode() != Instruction::ZExt)
 1594       switch (T->getOpcode()) {
 1610       if (I->getOpcode() != Instruction::Xor)
 1616       if (And0->getOpcode() != Instruction::And ||
 1617           And1->getOpcode() != Instruction::And)
 1673       if (I->getOpcode() != Instruction::Or)
 1685       if (I->getOpcode() != Instruction::LShr)
 1736       if (I->getOpcode() != Instruction::And)
 1742       if (Xor->getOpcode() != Instruction::Xor)
 1747       if (!And0 || And0->getOpcode() != Instruction::And)
lib/Target/Hexagon/HexagonOptimizeSZextends.cpp
  116       if (!(Shl && Shl->getOpcode() == Instruction::Shl))
lib/Target/Mips/MipsFastISel.cpp
  473       Opcode = I->getOpcode();
  554       Opcode = I->getOpcode();
  871   switch (I->getOpcode()) {
 1972   unsigned Opcode = I->getOpcode();
 2038   switch (I->getOpcode()) {
lib/Target/Mips/MipsOs16.cpp
   80       switch (Inst.getOpcode()) {
lib/Target/NVPTX/NVPTXTargetTransformInfo.h
  106     switch(I->getOpcode()){
lib/Target/PowerPC/PPCFastISel.cpp
  318       Opcode = I->getOpcode();
 1939   switch (I->getOpcode()) {
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  446                (J->getOpcode() == Instruction::UDiv ||
  447                 J->getOpcode() == Instruction::SDiv ||
  448                 J->getOpcode() == Instruction::URem ||
  449                 J->getOpcode() == Instruction::SRem)) {
  453                (J->getOpcode() == Instruction::Shl ||
  454                 J->getOpcode() == Instruction::AShr ||
  455                 J->getOpcode() == Instruction::LShr)) {
  468     if (J->getOpcode() == Instruction::FRem)
  472       switch(J->getOpcode()) {
lib/Target/SystemZ/SystemZTDC.cpp
  318     if (I.getOpcode() == Instruction::FCmp)
  320     else if (I.getOpcode() == Instruction::ICmp)
lib/Target/SystemZ/SystemZTargetTransformInfo.cpp
  476                 (I->getOpcode() == Instruction::And ||
  477                  I->getOpcode() == Instruction::Or ||
  478                  I->getOpcode() == Instruction::Xor))
  485             if (I->hasOneUse() && I->getOpcode() == Instruction::Xor)
  933   if ((UserI->getOpcode() == Instruction::Sub ||
  934        UserI->getOpcode() == Instruction::SDiv ||
  935        UserI->getOpcode() == Instruction::UDiv) &&
  942   switch (UserI->getOpcode()) {
  950     if (UserI->getOpcode() != Instruction::ICmp) {
  978     if (UserI->getOpcode() == Instruction::ICmp)
lib/Target/WebAssembly/WebAssemblyFastISel.cpp
  217       Opcode = I->getOpcode();
 1361   switch (I->getOpcode()) {
 1395   return selectOperator(I, I->getOpcode());
lib/Target/X86/X86FastISel.cpp
  839       Opcode = I->getOpcode();
 1018     Opcode = I->getOpcode();
 1785     switch (I->getOpcode()) {
 1794     switch (I->getOpcode()) {
 1803     switch (I->getOpcode()) {
 1812     switch (I->getOpcode()) {
 1925   switch (I->getOpcode()) {
 1985   if ((I->getOpcode() == Instruction::SRem ||
 1986        I->getOpcode() == Instruction::URem) &&
 2471   assert((I->getOpcode() == Instruction::FPExt ||
 2472           I->getOpcode() == Instruction::FPTrunc) &&
 3603   switch (I->getOpcode()) {
lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp
   65   if (I.getOpcode() != Instruction::PHI || I.getNumOperands() != 2)
  265   if (I.getOpcode() != Instruction::LShr)
lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
   42   unsigned Opc = I->getOpcode();
  102     unsigned Opc = I->getOpcode();
  309     unsigned Opc = I->getOpcode();
lib/Transforms/IPO/Attributor.cpp
 1295   switch (I->getOpcode()) {
 1365   switch (I->getOpcode()) {
 4158   switch (UserI->getOpcode()) {
 4686     switch (I.getOpcode()) {
 4706       InstOpcodeMap[I.getOpcode()].push_back(&I);
lib/Transforms/IPO/CalledValuePropagation.cpp
  172     switch (I.getOpcode()) {
lib/Transforms/IPO/FunctionAttrs.cpp
  466     switch (I->getOpcode()) {
  881       switch (RVI->getOpcode()) {
  994     switch (RVI->getOpcode()) {
lib/Transforms/IPO/PartialInlining.cpp
  853     switch (I.getOpcode()) {
lib/Transforms/InstCombine/InstCombineAddSub.cpp
  352   unsigned Opcode = I->getOpcode();
  389   if (I->getOpcode() == Instruction::FMul) {
  434   assert((I->getOpcode() == Instruction::FAdd ||
  435           I->getOpcode() == Instruction::FSub) && "Expect add/sub");
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  931   assert(CxtI.getOpcode() == Instruction::And);
lib/Transforms/InstCombine/InstCombineCalls.cpp
 3955         Pred == ICmpInst::ICMP_NE && LHS->getOpcode() == Instruction::Load &&
lib/Transforms/InstCombine/InstCombineCasts.cpp
  174   unsigned Opc = I->getOpcode();
  350   switch (I->getOpcode()) {
  992   switch (I->getOpcode()) {
 1021         if (I->getOpcode() == Instruction::And)
 1321   switch (I->getOpcode()) {
 1961   switch (I->getOpcode()) {
lib/Transforms/InstCombine/InstCombineCompares.cpp
 3175   switch (LHSI->getOpcode()) {
 3489   auto XShiftOpcode = XShift->getOpcode();
 3490   if (XShiftOpcode == YShift->getOpcode())
 4539   assert(MulInstr->getOpcode() == Instruction::Mul);
 6040     switch (LHSI->getOpcode()) {
lib/Transforms/InstCombine/InstCombineInternal.h
  225     switch (I->getOpcode()) {
lib/Transforms/InstCombine/InstCombinePHI.cpp
  286   unsigned Opc = FirstInst->getOpcode();
  296     if (!I || I->getOpcode() != Opc || !I->hasOneUse() ||
 1002       if (UserI->getOpcode() != Instruction::LShr ||
 1138       cast<Instruction>(PN.getIncomingValue(0))->getOpcode() ==
 1139       cast<Instruction>(PN.getIncomingValue(1))->getOpcode() &&
lib/Transforms/InstCombine/InstCombineSelect.cpp
  318       if (TI->getOpcode() != Instruction::BitCast &&
  332     return CastInst::Create(Instruction::CastOps(TI->getOpcode()), NewSI,
  343     if (TI->getOpcode() != Instruction::FNeg)
 1676   if ((TI->getOpcode() == Instruction::Sub &&
 1677        FI->getOpcode() == Instruction::Add) ||
 1678       (TI->getOpcode() == Instruction::FSub &&
 1679        FI->getOpcode() == Instruction::FAdd)) {
 1682   } else if ((FI->getOpcode() == Instruction::Sub &&
 1683               TI->getOpcode() == Instruction::Add) ||
 1684              (FI->getOpcode() == Instruction::FSub &&
 1685               TI->getOpcode() == Instruction::FAdd)) {
 1746   auto ExtOpcode = ExtInst->getOpcode();
 2405   if (TI && FI && TI->getOpcode() == FI->getOpcode())
 2405   if (TI && FI && TI->getOpcode() == FI->getOpcode())
lib/Transforms/InstCombine/InstCombineShifts.cpp
   71   bool IdenticalShOpcodes = Sh0->getOpcode() == Sh1->getOpcode();
  356   bool IsInnerShl = InnerShift->getOpcode() == Instruction::Shl;
  433   switch (I->getOpcode()) {
  550   switch (I->getOpcode()) {
 1145   if (HighBitExtract->getOpcode() == OldAShr.getOpcode())
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  161   switch (I->getOpcode()) {
  291       if (LHSInst->getOpcode() == Instruction::And && LHSInst->hasOneUse() &&
  454     if ((I->getOpcode() == Instruction::Add ||
  461     Known = KnownBits::computeForAddSub(I->getOpcode() == Instruction::Add,
  777   switch (I->getOpcode()) {
  927   bool isLshr = (Shr->getOpcode() == Instruction::LShr);
 1182   switch (I->getOpcode()) {
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  263   switch (UserInstr->getOpcode()) {
 1142   switch (I->getOpcode()) {
 1216   switch (I->getOpcode()) {
 1314   switch (I->getOpcode()) {
lib/Transforms/InstCombine/InstructionCombining.cpp
  840       return ConstantExpr::get(I.getOpcode(), SOC, ConstOperand);
  841     return ConstantExpr::get(I.getOpcode(), ConstOperand, SOC);
 1383     } else if (Ancestor->getOpcode() == Instruction::Trunc) {
 1389     assert((Ancestor->getOpcode() != Instruction::SExt || NoSignedWrap) &&
 2282       switch (I->getOpcode()) {
lib/Transforms/Instrumentation/PoisonChecking.cpp
  112   switch (I.getOpcode()) {
  192   switch (I.getOpcode()) {
lib/Transforms/Scalar/ConstantHoisting.cpp
  367     Cost = TTI->getIntImmCost(Inst->getOpcode(), Idx, ConstInt->getValue(),
  576       unsigned Opcode = User.Inst->getOpcode();
lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  841       switch (II->getOpcode()) {
  889     switch (Term->getOpcode()) {
lib/Transforms/Scalar/DivRemPairs.cpp
   66   M.Key.SignedOp = Div->getOpcode() == Instruction::SDiv;
   85     assert((DivInst->getOpcode() == Instruction::UDiv ||
   86             DivInst->getOpcode() == Instruction::SDiv) &&
   97   bool isSigned() const { return DivInst->getOpcode() == Instruction::SDiv; }
  104     switch (RemInst->getOpcode()) {
  129       if (I.getOpcode() == Instruction::SDiv)
  131       else if (I.getOpcode() == Instruction::UDiv)
  133       else if (I.getOpcode() == Instruction::SRem)
  135       else if (I.getOpcode() == Instruction::URem)
lib/Transforms/Scalar/EarlyCSE.cpp
  190     return hash_combine(Inst->getOpcode(), Pred, LHS, RHS);
  206       return hash_combine(Inst->getOpcode(), SPF, A, B);
  210       return hash_combine(Inst->getOpcode(), SPF, A, B);
  219       return hash_combine(Inst->getOpcode(), Cond, A, B);
  227     return hash_combine(Inst->getOpcode(), Pred, X, Y, A, B);
  234     return hash_combine(EVI->getOpcode(), EVI->getOperand(0),
  238     return hash_combine(IVI->getOpcode(), IVI->getOperand(0),
  249       Inst->getOpcode(),
  271   if (LHSI->getOpcode() != RHSI->getOpcode())
  271   if (LHSI->getOpcode() != RHSI->getOpcode())
  418       Inst->getOpcode(),
lib/Transforms/Scalar/Float2Int.cpp
  132       switch (I.getOpcode()) {
  195     switch (I->getOpcode()) {
  208       auto CastOp = (Instruction::CastOps)I->getOpcode();
  247     switch (I->getOpcode()) {
  268         auto BinOp = (Instruction::BinaryOps) I->getOpcode();
  283         auto CastOp = (Instruction::CastOps)I->getOpcode();
  443     if (I->getOpcode() == Instruction::UIToFP ||
  444         I->getOpcode() == Instruction::SIToFP) {
  463   switch (I->getOpcode()) {
  496     NewV = IRB.CreateBinOp(mapBinOpcode(I->getOpcode()),
lib/Transforms/Scalar/GVN.cpp
  275   e.opcode = I->getOpcode();
  347   e.opcode = EI->getOpcode();
  493   switch (I->getOpcode()) {
lib/Transforms/Scalar/GVNSink.cpp
  358     setOpcode(I->getOpcode());
  435     switch (I->getOpcode()) {
lib/Transforms/Scalar/IndVarSimplify.cpp
 1089   unsigned Opcode = DU.NarrowUse->getOpcode();
 1181     switch (NarrowUse->getOpcode()) {
 1256   const unsigned OpCode = DU.NarrowUse->getOpcode();
 1420   const unsigned OpCode = NarrowUse->getOpcode();
 1448   if (I && I->getOpcode() != Instruction::Load)
 2025   switch (IncI->getOpcode()) {
 2044   if (IncI->getOpcode() == Instruction::GetElementPtr)
lib/Transforms/Scalar/InferAddressSpaces.cpp
  448   if (I->getOpcode() == Instruction::AddrSpaceCast) {
  469   switch (I->getOpcode()) {
lib/Transforms/Scalar/JumpThreading.cpp
  691     if (I->getOpcode() == Instruction::Or ||
  692         I->getOpcode() == Instruction::And) {
  704       if (I->getOpcode() == Instruction::Or)
  730     if (I->getOpcode() == Instruction::Xor &&
 1230   if (CondInst->getOpcode() == Instruction::Xor &&
lib/Transforms/Scalar/LICM.cpp
  866       if (I.getOpcode() == Instruction::FDiv &&
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
 1310     if (!DefX2 || DefX2->getOpcode() != Instruction::And)
 1345       if (Inst->getOpcode() != Instruction::Add)
 1441   IntrinID = DefX->getOpcode() == Instruction::Shl ? Intrinsic::cttz :
 1457   if (DefX->getOpcode() == Instruction::AShr && !isKnownNonNegative(InitX, DL))
 1470     if (Inst->getOpcode() != Instruction::Add)
 1707     if (DefX->getOpcode() == Instruction::AShr)
 1710     else if (DefX->getOpcode() == Instruction::LShr)
 1713     else if (DefX->getOpcode() == Instruction::Shl) // cttz
lib/Transforms/Scalar/LoopRerollPass.cpp
  744     switch (I->getOpcode()) {
lib/Transforms/Scalar/LoopStrengthReduce.cpp
  946           if (UI && UI->getOpcode() == Instruction::Mul &&
lib/Transforms/Scalar/LowerExpectIntrinsic.cpp
  147       switch (Op->getOpcode()) {
lib/Transforms/Scalar/NaryReassociate.cpp
  217   switch (I->getOpcode()) {
  286   switch (I->getOpcode()) {
lib/Transforms/Scalar/NewGVN.cpp
 1023   E->setOpcode(I->getOpcode());
 1246   E->setOpcode(I->getOpcode());
 1968     switch (I->getOpcode()) {
lib/Transforms/Scalar/Reassociate.cpp
   77   dbgs() << Instruction::getOpcodeName(I->getOpcode()) << " "
  123   if (I && (I->getOpcode() == Instruction::Or ||
  124             I->getOpcode() == Instruction::And)) {
  134       isOr = (I->getOpcode() == Instruction::Or);
  149   if (I && I->hasOneUse() && I->getOpcode() == Opcode)
  159       (I->getOpcode() == Opcode1 || I->getOpcode() == Opcode2))
  159       (I->getOpcode() == Opcode1 || I->getOpcode() == Opcode2))
  457   unsigned Opcode = I->getOpcode();
  573               cast<Instruction>(Op)->getOpcode() != Opcode
  904     if (TheNeg->getOpcode() == Instruction::Sub) {
 1924       unsigned Opcode = Op->getOpcode();
 1925       while (Op->hasOneUse() && Op->user_back()->getOpcode() == Opcode &&
 1955   switch (I->getOpcode()) {
 1993   assert((I->getOpcode() == Instruction::FAdd ||
 1994           I->getOpcode() == Instruction::FSub) && "Expected fadd/fsub");
 2006   bool IsFSub = I->getOpcode() == Instruction::FSub;
 2076   if (I->getOpcode() == Instruction::Shl && isa<ConstantInt>(I->getOperand(1)))
 2114   if (I->getOpcode() == Instruction::Sub) {
 2138   } else if (I->getOpcode() == Instruction::FNeg ||
 2139              I->getOpcode() == Instruction::FSub) {
 2174   if (BO->hasOneUse() && BO->user_back()->getOpcode() == Opcode) {
 2187       cast<Instruction>(BO->user_back())->getOpcode() == Instruction::Sub)
 2190       cast<Instruction>(BO->user_back())->getOpcode() == Instruction::FSub)
 2243         cast<Instruction>(I->user_back())->getOpcode() == Instruction::Add &&
 2249                cast<Instruction>(I->user_back())->getOpcode() ==
 2333       if (I.hasOneUse() && I.user_back()->getOpcode() == I.getOpcode())
 2333       if (I.hasOneUse() && I.user_back()->getOpcode() == I.getOpcode())
 2344         if (!OpI || OpI->getOpcode() != I.getOpcode() || !OpI->hasOneUse()) {
 2344         if (!OpI || OpI->getOpcode() != I.getOpcode() || !OpI->hasOneUse()) {
 2359       unsigned BinaryIdx = I.getOpcode() - Instruction::BinaryOpsBegin;
lib/Transforms/Scalar/SCCP.cpp
  983     Constant *C = ConstantExpr::get(I.getOpcode(), V0State.getConstant());
 1007     Constant *C = ConstantExpr::get(I.getOpcode(), V1State.getConstant(),
 1023   if (I.getOpcode() == Instruction::UDiv || I.getOpcode() == Instruction::SDiv)
 1023   if (I.getOpcode() == Instruction::UDiv || I.getOpcode() == Instruction::SDiv)
 1031   if (I.getOpcode() == Instruction::And || I.getOpcode() == Instruction::Mul ||
 1031   if (I.getOpcode() == Instruction::And || I.getOpcode() == Instruction::Mul ||
 1032       I.getOpcode() == Instruction::Or) {
 1043       if (I.getOpcode() == Instruction::And ||
 1044           I.getOpcode() == Instruction::Mul) {
 1512       switch (I.getOpcode()) {
lib/Transforms/Scalar/Scalarizer.cpp
  691              VI->getOpcode() == Instruction::BitCast)
lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  129       if (!OpI || OpI->getOpcode() != Root.getOpcode())
  129       if (!OpI || OpI->getOpcode() != Root.getOpcode())
  396       if (cast<Instruction>(BI.getCondition())->getOpcode() != Instruction::Or)
  399       if (cast<Instruction>(BI.getCondition())->getOpcode() != Instruction::And)
  476       assert(cast<Instruction>(BI.getCondition())->getOpcode() ==
  480       assert(cast<Instruction>(BI.getCondition())->getOpcode() ==
 1934     if (cast<Instruction>(BI->getCondition())->getOpcode() != Instruction::Or) {
 1935       assert(cast<Instruction>(BI->getCondition())->getOpcode() ==
 2575     if (CondI.getOpcode() != Instruction::And &&
 2576       CondI.getOpcode() != Instruction::Or)
 2688         if (cast<Instruction>(BI.getCondition())->getOpcode() ==
 2693           assert(cast<Instruction>(BI.getCondition())->getOpcode() ==
lib/Transforms/Scalar/SpeculateAroundPHIs.cpp
  290             TTI.getIntImmCost(UserI->getOpcode(), Idx, IncomingC->getValue(),
lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  373   switch (I->getOpcode()) {
lib/Transforms/Scalar/TailRecursionElimination.cpp
  125       switch (I->getOpcode()) {
lib/Transforms/Utils/BreakCriticalEdges.cpp
  338     switch (PredTerm->getOpcode()) {
lib/Transforms/Utils/BypassSlowDivision.cpp
   93     return SlowDivOrRem->getOpcode() == Instruction::SDiv ||
   94            SlowDivOrRem->getOpcode() == Instruction::SRem;
   98     return SlowDivOrRem->getOpcode() == Instruction::SDiv ||
   99            SlowDivOrRem->getOpcode() == Instruction::UDiv;
  114   switch (I->getOpcode()) {
  195   switch (I->getOpcode()) {
lib/Transforms/Utils/CodeExtractor.cpp
  320     unsigned Opcode = II.getOpcode();
lib/Transforms/Utils/FunctionComparator.cpp
  505   if (int Res = cmpNumbers(L->getOpcode(), R->getOpcode()))
  505   if (int Res = cmpNumbers(L->getOpcode(), R->getOpcode()))
  938       H.add(Inst.getOpcode());
lib/Transforms/Utils/InlineFunction.cpp
 2296   assert(Br && Br->getOpcode() == Instruction::Br &&
lib/Transforms/Utils/LibCallsShrinkWrap.cpp
  452   unsigned Opcode = I->getOpcode();
lib/Transforms/Utils/Local.cpp
 2694     if (I->getOpcode() == Instruction::Or) {
 2738       if (I->getOpcode() == Instruction::Shl) {
 2751     if (I->getOpcode() == Instruction::And &&
 2776     if (I->getOpcode() == Instruction::ZExt) {
 2910   switch (I->getOpcode()) {
lib/Transforms/Utils/LoopRotationUtils.cpp
  538     switch (I->getOpcode()) {
lib/Transforms/Utils/LoopUtils.cpp
  987   const unsigned Opcode = Intersection->getOpcode();
  993     if (OpValue == nullptr || Opcode == Instr->getOpcode())
lib/Transforms/Utils/SimplifyCFG.cpp
  635     bool isEQ = (cast<Instruction>(V)->getOpcode() == Instruction::Or);
  650         if (I->getOpcode() == (isEQ ? Instruction::Or : Instruction::And)) {
 3718   bool TrueWhenEqual = (Cond->getOpcode() == Instruction::Or);
lib/Transforms/Utils/SimplifyIndVar.cpp
  113   switch (UseInst->getOpcode()) {
  135     if (UseInst->getOpcode() == Instruction::LShr) {
lib/Transforms/Utils/SimplifyLibCalls.cpp
 1977   if (!I || I->getOpcode() != Instruction::FMul || !I->isFast())
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
  419   if (!OpA || !OpB || OpA->getOpcode() != OpB->getOpcode() ||
  419   if (!OpA || !OpB || OpA->getOpcode() != OpB->getOpcode() ||
  451   if (OpB->getOpcode() == Instruction::Add &&
  515       if (!IM || IM->getOpcode() == Instruction::PHI)
lib/Transforms/Vectorize/LoopVectorize.cpp
 3184     return hash_combine(I->getOpcode(), hash_combine_range(I->value_op_begin(),
 4052   assert((I.getOpcode() == Instruction::UDiv ||
 4053           I.getOpcode() == Instruction::SDiv ||
 4054           I.getOpcode() == Instruction::URem ||
 4055           I.getOpcode() == Instruction::SRem) &&
 4063   switch (I.getOpcode()) {
 4163       Value *V = Builder.CreateNAryOp(I.getOpcode(), Ops);
 4207     bool FCmp = (I.getOpcode() == Instruction::FCmp);
 4548   switch(I->getOpcode()) {
 5748   Cost += VF * TTI.getMemoryOpCost(I->getOpcode(), ValTy->getScalarType(),
 5783     Cost += TTI.getMaskedMemoryOpCost(I->getOpcode(), VectorTy,
 5786     Cost += TTI.getMemoryOpCost(I->getOpcode(), VectorTy, Alignment, AS, I);
 5824          TTI.getGatherScatterOpCost(I->getOpcode(), VectorTy, Ptr,
 5854       I->getOpcode(), WideVecTy, Group->getFactor(), Indices,
 5877            TTI.getMemoryOpCost(I->getOpcode(), ValTy, Alignment, AS, I);
 6100   switch (I->getOpcode()) {
 6174       Cost += VF * TTI.getArithmeticInstrCost(I->getOpcode(), RetTy);
 6201     if (I->getOpcode() == Instruction::Mul && isStrideMul(I, Legal))
 6215                    I->getOpcode(), VectorTy, TargetTransformInfo::OK_AnyValue,
 6221                    I->getOpcode(), VectorTy, TargetTransformInfo::OK_AnyValue,
 6234     return TTI.getCmpSelInstrCost(I->getOpcode(), VectorTy, CondTy, I);
 6243     return TTI.getCmpSelInstrCost(I->getOpcode(), VectorTy, nullptr, I);
 6289       if (I->getOpcode() == Instruction::Trunc) {
 6293       } else if (I->getOpcode() == Instruction::ZExt ||
 6294                  I->getOpcode() == Instruction::SExt) {
 6302     return N * TTI.getCastInstrCost(I->getOpcode(), VectorTy, SrcVecTy, I);
 6888   if (!IsVectorizableOpcode(I->getOpcode()))
lib/Transforms/Vectorize/SLPVectorizer.cpp
  328     return MainOp ? MainOp->getOpcode() : 0;
  332     return AltOp ? AltOp->getOpcode() : 0;
  339     unsigned CheckedOpcode = I->getOpcode();
  371   unsigned Opcode = cast<Instruction>(VL[BaseIndex])->getOpcode();
  378     unsigned InstOpcode = cast<Instruction>(VL[Cnt])->getOpcode();
  421   unsigned Opcode = E->getOpcode();
  441   unsigned Opcode = UserInst->getOpcode();
  811                cast<Instruction>(Op)->getOpcode() ==
  812                    cast<Instruction>(OpLastLane)->getOpcode()) ||
 1298       unsigned CheckedOpcode = I->getOpcode();
 1328       return MainOp ? MainOp->getOpcode() : 0;
 1332       return AltOp ? AltOp->getOpcode() : 0;
 2836   assert(E0->getOpcode() == Instruction::ExtractElement ||
 2837          E0->getOpcode() == Instruction::ExtractValue);
 2838   assert(E0->getOpcode() == getSameOpcode(VL).getOpcode() && "Invalid opcode");
 2847   if (E0->getOpcode() == Instruction::ExtractValue) {
 3020                     Ext->getOpcode(), Ext->getType(), VecTy, i);
 3023                     Ext->getOpcode(), Ext->getType(), E->getType(), Ext);
 4203         if (OpInst->getOpcode() == E->getAltOpcode()) {
 5000   switch (I->getOpcode()) {
 5825         Opcode = I->getOpcode();
lib/Transforms/Vectorize/VPlanHCFGBuilder.cpp
  219           Inst->getOpcode(), {} /*No operands*/, Inst));
  231           VPIRBuilder.createNaryOp(Inst->getOpcode(), VPOperands, Inst));
lib/Transforms/Vectorize/VPlanSLP.cpp
   92   unsigned Opcode = OriginalInstr->getOpcode();
   96         return I->getOpcode() == Opcode &&
tools/clang/unittests/CodeGen/IRMatchers.h
  252     return I.getOpcode() == Code;
tools/lldb/source/Expression/IRInterpreter.cpp
  511       switch (ii->getOpcode()) {
  693     switch (inst->getOpcode()) {
  744       switch (inst->getOpcode()) {
tools/llvm-diff/DifferenceEngine.cpp
  249     if (L->getOpcode() != R->getOpcode()) {
  249     if (L->getOpcode() != R->getOpcode()) {
tools/polly/lib/Support/SCEVAffinator.cpp
  497   assert(SDiv->getOpcode() == Instruction::SDiv && "Assumed SDiv instruction!");
  514   assert(SRem->getOpcode() == Instruction::SRem && "Assumed SRem instruction!");
  532     switch (I->getOpcode()) {
tools/polly/lib/Support/SCEVValidator.cpp
  353     assert(I->getOpcode() == Instruction::Call && "Call instruction expected");
  408     assert(SDiv->getOpcode() == Instruction::SDiv &&
  417     assert(SRem->getOpcode() == Instruction::SRem &&
  444       switch (I->getOpcode()) {
  593     if (!Inst || (Inst->getOpcode() != Instruction::SRem &&
  594                   Inst->getOpcode() != Instruction::SDiv))
tools/polly/lib/Support/ScopHelper.cpp
  311     if (!Inst || (Inst->getOpcode() != Instruction::SRem &&
  312                   Inst->getOpcode() != Instruction::SDiv))
  324     Inst = BinaryOperator::Create((Instruction::BinaryOps)Inst->getOpcode(),
unittests/Analysis/ScalarEvolutionTest.cpp
 1669     EXPECT_EQ(I->getOpcode(), Instruction::Shl);
unittests/Analysis/SparsePropagation.cpp
  144     switch (I.getOpcode()) {
unittests/Transforms/Utils/IntegerDivisionTest.cpp
   41   EXPECT_TRUE(BB->front().getOpcode() == Instruction::SDiv);
   46   EXPECT_TRUE(BB->front().getOpcode() == Instruction::AShr);
   49   EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::Sub);
   71   EXPECT_TRUE(BB->front().getOpcode() == Instruction::UDiv);
   76   EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp);
   79   EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::PHI);
  101   EXPECT_TRUE(BB->front().getOpcode() == Instruction::SRem);
  106   EXPECT_TRUE(BB->front().getOpcode() == Instruction::AShr);
  109   EXPECT_TRUE(Remainder && Remainder->getOpcode() == Instruction::Sub);
  131   EXPECT_TRUE(BB->front().getOpcode() == Instruction::URem);
  136   EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp);
  139   EXPECT_TRUE(Remainder && Remainder->getOpcode() == Instruction::Sub);
  162   EXPECT_TRUE(BB->front().getOpcode() == Instruction::SDiv);
  167   EXPECT_TRUE(BB->front().getOpcode() == Instruction::AShr);
  170   EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::Sub);
  192   EXPECT_TRUE(BB->front().getOpcode() == Instruction::UDiv);
  197   EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp);
  200   EXPECT_TRUE(Quotient && Quotient->getOpcode() == Instruction::PHI);
  222   EXPECT_TRUE(BB->front().getOpcode() == Instruction::SRem);
  227   EXPECT_TRUE(BB->front().getOpcode() == Instruction::AShr);
  230   EXPECT_TRUE(Remainder && Remainder->getOpcode() == Instruction::Sub);
  252   EXPECT_TRUE(BB->front().getOpcode() == Instruction::URem);
  257   EXPECT_TRUE(BB->front().getOpcode() == Instruction::ICmp);
  260   EXPECT_TRUE(Remainder && Remainder->getOpcode() == Instruction::Sub);