Lines Matching full:instruction
40 // ConstantFold*Instruction Implementations
89 Instruction::CastOps firstOp = Instruction::CastOps(Op->getOpcode());
90 Instruction::CastOps secondOp = Instruction::CastOps(opc);
108 // the first element. If so, return the appropriate GEP instruction.
237 case Instruction::Or: {
252 case Instruction::And: {
266 case Instruction::LShr: {
288 case Instruction::Shl: {
310 case Instruction::ZExt: {
530 if (opc == Instruction::ZExt || opc == Instruction::SExt ||
531 opc == Instruction::UIToFP || opc == Instruction::SIToFP)
546 } else if (CE->getOpcode() == Instruction::GetElementPtr &&
549 opc != Instruction::AddrSpaceCast) {
587 case Instruction::FPTrunc:
588 case Instruction::FPExt:
603 case Instruction::FPToUI:
604 case Instruction::FPToSI:
611 V.convertToInteger(x, DestBitWidth, opc==Instruction::FPToSI,
621 case Instruction::IntToPtr: //always treated as unsigned
625 case Instruction::PtrToInt: // always treated as unsigned
633 if (CE->getOpcode() == Instruction::GetElementPtr &&
669 case Instruction::UIToFP:
670 case Instruction::SIToFP:
676 apf.convertFromAPInt(api, opc==Instruction::SIToFP,
685 case Instruction::ZExt:
692 case Instruction::SExt:
699 case Instruction::Trunc: {
719 case Instruction::BitCast:
721 case Instruction::AddrSpaceCast:
768 if (TrueVal->getOpcode() == Instruction::Select)
773 if (FalseVal->getOpcode() == Instruction::Select)
916 case Instruction::Xor:
922 case Instruction::Add:
923 case Instruction::Sub:
925 case Instruction::And:
929 case Instruction::Mul: {
942 case Instruction::SDiv:
943 case Instruction::UDiv:
953 case Instruction::URem:
954 case Instruction::SRem:
963 case Instruction::Or: // X | undef -> -1
967 case Instruction::LShr:
976 case Instruction::AShr:
986 case Instruction::Shl:
1001 case Instruction::Add:
1004 case Instruction::Sub:
1007 case Instruction::Mul:
1012 case Instruction::UDiv:
1013 case Instruction::SDiv:
1019 case Instruction::URem:
1020 case Instruction::SRem:
1026 case Instruction::And:
1033 if (CE1->getOpcode() == Instruction::ZExt) {
1043 if (CE1->getOpcode() == Instruction::PtrToInt &&
1064 case Instruction::Or:
1069 case Instruction::Xor:
1075 case Instruction::ICmp:
1076 case Instruction::FCmp:
1086 case Instruction::AShr:
1089 if (CE1->getOpcode() == Instruction::ZExt) // Top bits known zero.
1095 if (Instruction::isCommutative(Opcode))
1107 case Instruction::Add:
1109 case Instruction::Sub:
1111 case Instruction::Mul:
1113 case Instruction::UDiv:
1116 case Instruction::SDiv:
1121 case Instruction::URem:
1124 case Instruction::SRem:
1129 case Instruction::And:
1131 case Instruction::Or:
1133 case Instruction::Xor:
1135 case Instruction::Shl:
1139 case Instruction::LShr:
1143 case Instruction::AShr:
1151 case Instruction::SDiv:
1152 case Instruction::UDiv:
1153 case Instruction::URem:
1154 case Instruction::SRem:
1155 case Instruction::LShr:
1156 case Instruction::AShr:
1157 case Instruction::Shl:
1171 case Instruction::FAdd:
1174 case Instruction::FSub:
1177 case Instruction::FMul:
1180 case Instruction::FDiv:
1183 case Instruction::FRem:
1211 if (Instruction::isAssociative(Opcode) && CE1->getOpcode() == Opcode) {
1219 if (Instruction::isCommutative(Opcode))
1226 case Instruction::Add:
1227 case Instruction::Sub:
1229 case Instruction::Mul:
1231 case Instruction::Shl:
1232 case Instruction::LShr:
1233 case Instruction::AShr:
1237 case Instruction::SDiv:
1238 case Instruction::UDiv:
1242 case Instruction::URem:
1243 case Instruction::SRem:
1361 case Instruction::FPTrunc:
1362 case Instruction::FPExt:
1363 case Instruction::UIToFP:
1364 case Instruction::SIToFP:
1502 case Instruction::Trunc:
1503 case Instruction::FPTrunc:
1504 case Instruction::FPExt:
1505 case Instruction::FPToUI:
1506 case Instruction::FPToSI:
1509 case Instruction::UIToFP:
1510 case Instruction::SIToFP:
1511 case Instruction::BitCast:
1512 case Instruction::ZExt:
1513 case Instruction::SExt:
1518 if (CE1->getOpcode() == Instruction::ZExt) isSigned = false;
1519 if (CE1->getOpcode() == Instruction::SExt) isSigned = true;
1526 case Instruction::GetElementPtr: {
1587 case Instruction::GetElementPtr:
1938 if (CE2->getOpcode() == Instruction::BitCast &&
1947 if ((CE1->getOpcode() == Instruction::SExt && ICmpInst::isSigned(pred)) ||
1948 (CE1->getOpcode() == Instruction::ZExt && !ICmpInst::isSigned(pred))){
2059 // Combine Indices - If the source pointer to this getelementptr instruction
2060 // is a getelementptr instruction, combine the indices of the two
2061 // getelementptr instructions into a single instruction.
2063 if (CE->getOpcode() == Instruction::GetElementPtr) {
2115 Combined = ConstantExpr::get(Instruction::Add, C1, C2);
2118 ConstantExpr::get(Instruction::Add, Idx0, Combined);