Home | History | Annotate | Download | only in InstCombine

Lines Matching defs:In

267 /// results in any code being generated and is interesting to optimize out. If
329 /// can be computed by computing V in the smaller type. If V is an instruction,
336 // We can always evaluate constants in another type.
352 // require duplicating the instruction in general, which isn't profitable.
384 // constant amount, we can always perform a SHL in a smaller type.
393 // lshr iff we know that the bits we would otherwise be shifting in are
455 // If this cast is a truncate, evaluting in a different type always
488 // amount is smaller than ASize, it is always safe to do the shift in A's
509 /// in order to eliminate the icmp.
524 Value *In = ICI->getOperand(0);
525 Value *Sh = ConstantInt::get(In->getType(),
526 In->getType()->getScalarSizeInBits()-1);
527 In = Builder->CreateLShr(In, Sh, In->getName()+".lobit");
528 if (In->getType() != CI.getType())
529 In = Builder->CreateIntCast(In, CI.getType(), false/*ZExt*/);
532 Constant *One = ConstantInt::get(In->getType(), 1);
533 In = Builder->CreateXor(In, One, In->getName()+".not");
536 return ReplaceInstUsesWith(CI, In);
570 Value *In = ICI->getOperand(0);
573 // Insert the shift to put the result in the low bit.
574 In = Builder->CreateLShr(In, ConstantInt::get(In->getType(),ShiftAmt),
575 In->getName()+".lobit");
579 Constant *One = ConstantInt::get(In->getType(), 1);
580 In = Builder->CreateXor(In, One);
583 if (CI.getType() == In->getType())
584 return ReplaceInstUsesWith(CI, In);
585 return CastInst::CreateIntegerCast(In, CI.getType(), false/*ZExt*/);
633 /// CanEvaluateZExtd - Determine if the specified value can be computed in the
637 /// (in BitsToClear) which indicates that the value it computes is correct for
647 /// cleared in addition to bits 32-63. Since an 'and' will be generated to
665 // require duplicating the instruction in general, which isn't profitable.
687 // If the operation is an AND/OR/XOR and the bits to clear are zero in the
731 // known zero in the disagreeing side.
746 // are known zero in the disagreeing input.
900 /// in order to eliminate the icmp.
913 Value *In = Builder->CreateAShr(Op0, Sh, Op0->getName()+".lobit");
914 if (In->getType() != CI.getType())
915 In = Builder->CreateIntCast(In, CI.getType(), true/*SExt*/);
918 In = Builder->CreateNot(In, In->getName()+".not");
919 return ReplaceInstUsesWith(CI, In);
933 Value *In = ICI->getOperand(0);
947 // Perform a right shift to place the desired bit in the LSB.
949 In = Builder->CreateLShr(In,
950 ConstantInt::get(In->getType(), ShiftAmt));
952 // At this point "In" is either 1 or 0. Subtract 1 to turn
954 In = Builder->CreateAdd(In,
955 ConstantInt::getAllOnesValue(In->getType()),
961 // Perform a left shift to place the desired bit in the MSB.
963 In = Builder->CreateShl(In,
964 ConstantInt::get(In->getType(), ShiftAmt));
967 In = Builder->CreateAShr(In, ConstantInt::get(In->getType(),
971 if (CI.getType() == In->getType())
972 return ReplaceInstUsesWith(CI, In);
973 return CastInst::CreateIntegerCast(In, CI.getType(), true/*SExt*/);
986 Value *In = Builder->CreateAShr(Op0, VSh, Op0->getName()+".lobit");
987 return ReplaceInstUsesWith(CI, In);
1017 // require duplicating the instruction in general, which isn't profitable.
1150 /// in the specified FP type without changing its value.
1167 // If this value is a constant, return the constant in the smallest FP type
1296 // This is safe if the intermediate type has enough bits in its mantissa to
1316 // This is safe if the intermediate type has enough bits in its mantissa to
1453 // If we're shrinking the number of elements, just shuffle in the low
1460 // If we're increasing the number of elements, shuffle in all of the
1488 /// insertions into the vector. See the example in the comment for
1493 /// filling in Elements with the elements found here.
1621 /// bitcast. The various long double bitcasts can't get in here.
1794 // evaluating the shuffle in the casted destination's type will allow