Lines Matching full:instruction
39 // If a non-mappable instruction is seen, this entire def-use graph is marked
40 // as non-transformable. If we see an instruction that converts from the
78 static Instruction::BinaryOps mapBinOpcode(unsigned Opcode) {
81 case Instruction::FAdd: return Instruction::Add;
82 case Instruction::FSub: return Instruction::Sub;
83 case Instruction::FMul: return Instruction::Mul;
92 // handle. For example, an instruction may have itself as an operand.
96 for (Instruction &I : BB) {
101 case Instruction::FPToUI:
102 case Instruction::FPToSI:
105 case Instruction::FCmp:
116 void Float2IntPass::seen(Instruction *I, ConstantRange R) {
140 // can only handle small instruction sequences. Instead, we split the search
153 std::deque<Instruction*> Worklist(Roots.begin(), Roots.end());
155 Instruction *I = Worklist.back();
169 case Instruction::UIToFP:
170 case Instruction::SIToFP: {
175 auto CastOp = (Instruction::CastOps)I->getOpcode();
180 case Instruction::FNeg:
181 case Instruction::FAdd:
182 case Instruction::FSub:
183 case Instruction::FMul:
184 case Instruction::FPToUI:
185 case Instruction::FPToSI:
186 case Instruction::FCmp:
192 if (Instruction *OI = dyn_cast<Instruction>(O)) {
198 // Not an instruction or ConstantFP? we can't do anything.
207 std::optional<ConstantRange> Float2IntPass::calcRange(Instruction *I) {
210 if (Instruction *OI = dyn_cast<Instruction>(O)) {
256 case Instruction::UIToFP:
257 case Instruction::SIToFP:
260 case Instruction::FNeg: {
267 case Instruction::FAdd:
268 case Instruction::FSub:
269 case Instruction::FMul: {
271 auto BinOp = (Instruction::BinaryOps) I->getOpcode();
279 case Instruction::FPToUI:
280 case Instruction::FPToSI: {
284 auto CastOp = (Instruction::CastOps)I->getOpcode();
288 case Instruction::FCmp:
297 std::deque<Instruction *> Worklist;
303 Instruction *I = Worklist.back();
326 Instruction *I = *MI;
341 Instruction *UI = dyn_cast<Instruction>(U);
404 Value *Float2IntPass::convert(Instruction *I, Type *ToTy) {
406 // Already converted this instruction.
411 // Don't recurse if we're an instruction that terminates the path.
412 if (I->getOpcode() == Instruction::UIToFP ||
413 I->getOpcode() == Instruction::SIToFP) {
415 } else if (Instruction *VI = dyn_cast<Instruction>(V)) {
429 // Now create a new instruction.
433 default: llvm_unreachable("Unhandled instruction!");
435 case Instruction::FPToUI:
439 case Instruction::FPToSI:
443 case Instruction::FCmp: {
450 case Instruction::UIToFP:
454 case Instruction::SIToFP:
458 case Instruction::FNeg:
462 case Instruction::FAdd:
463 case Instruction::FSub:
464 case Instruction::FMul:
471 // If we're a root instruction, RAUW.
488 ECs = EquivalenceClasses<Instruction*>();