Lines Matching full:instruction
38 // ConstantFold*Instruction Implementations
87 Instruction::CastOps firstOp = Instruction::CastOps(Op->getOpcode());
88 Instruction::CastOps secondOp = Instruction::CastOps(opc);
106 // the first element. If so, return the appropriate GEP instruction.
223 case Instruction::Or: {
238 case Instruction::And: {
252 case Instruction::LShr: {
274 case Instruction::Shl: {
296 case Instruction::ZExt: {
516 if (opc == Instruction::ZExt || opc == Instruction::SExt ||
517 opc == Instruction::UIToFP || opc == Instruction::SIToFP)
532 } else if (CE->getOpcode() == Instruction::GetElementPtr) {
570 case Instruction::FPTrunc:
571 case Instruction::FPExt:
586 case Instruction::FPToUI:
587 case Instruction::FPToSI:
593 (void) V.convertToInteger(x, DestBitWidth, opc==Instruction::FPToSI,
599 case Instruction::IntToPtr: //always treated as unsigned
603 case Instruction::PtrToInt: // always treated as unsigned
611 if (CE->getOpcode() == Instruction::GetElementPtr &&
647 case Instruction::UIToFP:
648 case Instruction::SIToFP:
654 opc==Instruction::SIToFP,
659 case Instruction::ZExt:
666 case Instruction::SExt:
673 case Instruction::Trunc: {
690 case Instruction::BitCast:
728 if (TrueVal->getOpcode() == Instruction::Select)
733 if (FalseVal->getOpcode() == Instruction::Select)
876 case Instruction::Xor:
882 case Instruction::Add:
883 case Instruction::Sub:
885 case Instruction::And:
889 case Instruction::Mul: {
900 case Instruction::UDiv:
901 case Instruction::SDiv:
903 if (Opcode == Instruction::UDiv || Opcode == Instruction::SDiv)
908 case Instruction::URem:
909 case Instruction::SRem:
913 case Instruction::Or: // X | undef -> -1
917 case Instruction::LShr:
922 case Instruction::AShr:
929 case Instruction::Shl:
940 case Instruction::Add:
943 case Instruction::Sub:
946 case Instruction::Mul:
951 case Instruction::UDiv:
952 case Instruction::SDiv:
958 case Instruction::URem:
959 case Instruction::SRem:
965 case Instruction::And:
972 if (CE1->getOpcode() == Instruction::ZExt) {
982 if (CE1->getOpcode() == Instruction::PtrToInt &&
1003 case Instruction::Or:
1008 case Instruction::Xor:
1014 case Instruction::ICmp:
1015 case Instruction::FCmp:
1025 case Instruction::AShr:
1028 if (CE1->getOpcode() == Instruction::ZExt) // Top bits known zero.
1034 if (Instruction::isCommutative(Opcode))
1046 case Instruction::Add:
1048 case Instruction::Sub:
1050 case Instruction::Mul:
1052 case Instruction::UDiv:
1055 case Instruction::SDiv:
1060 case Instruction::URem:
1063 case Instruction::SRem:
1068 case Instruction::And:
1070 case Instruction::Or:
1072 case Instruction::Xor:
1074 case Instruction::Shl: {
1081 case Instruction::LShr: {
1088 case Instruction::AShr: {
1099 case Instruction::SDiv:
1100 case Instruction::UDiv:
1101 case Instruction::URem:
1102 case Instruction::SRem:
1103 case Instruction::LShr:
1104 case Instruction::AShr:
1105 case Instruction::Shl:
1119 case Instruction::FAdd:
1122 case Instruction::FSub:
1125 case Instruction::FMul:
1128 case Instruction::FDiv:
1131 case Instruction::FRem:
1159 if (Instruction::isAssociative(Opcode) && CE1->getOpcode() == Opcode) {
1167 if (Instruction::isCommutative(Opcode))
1174 case Instruction::Add:
1175 case Instruction::Sub:
1177 case Instruction::Mul:
1179 case Instruction::Shl:
1180 case Instruction::LShr:
1181 case Instruction::AShr:
1185 case Instruction::SDiv:
1186 case Instruction::UDiv:
1190 case Instruction::URem:
1191 case Instruction::SRem:
1308 case Instruction::FPTrunc:
1309 case Instruction::FPExt:
1310 case Instruction::UIToFP:
1311 case Instruction::SIToFP:
1428 case Instruction::Trunc:
1429 case Instruction::FPTrunc:
1430 case Instruction::FPExt:
1431 case Instruction::FPToUI:
1432 case Instruction::FPToSI:
1435 case Instruction::UIToFP:
1436 case Instruction::SIToFP:
1437 case Instruction::BitCast:
1438 case Instruction::ZExt:
1439 case Instruction::SExt:
1444 if (CE1->getOpcode() == Instruction::ZExt) isSigned = false;
1445 if (CE1->getOpcode() == Instruction::SExt) isSigned = true;
1452 case Instruction::GetElementPtr:
1511 case Instruction::GetElementPtr:
1845 if (CE2->getOpcode() == Instruction::BitCast &&
1854 if ((CE1->getOpcode() == Instruction::SExt && ICmpInst::isSigned(pred)) ||
1855 (CE1->getOpcode() == Instruction::ZExt && !ICmpInst::isSigned(pred))){
1933 // Combine Indices - If the source pointer to this getelementptr instruction
1934 // is a getelementptr instruction, combine the indices of the two
1935 // getelementptr instructions into a single instruction.
1937 if (CE->getOpcode() == Instruction::GetElementPtr) {
1959 Combined = ConstantExpr::get(Instruction::Add, C1, C2);
1962 Instruction::Add, Idx0, Combined);