• Home
  • Raw
  • Download

Lines Matching refs:LHS

612                                           Value *LHS, Value *RHS,  in CreateInsertNUWNSWBinOp()  argument
615 BinaryOperator *BO = Insert(BinaryOperator::Create(Opc, LHS, RHS), Name); in CreateInsertNUWNSWBinOp()
632 Value *CreateAdd(Value *LHS, Value *RHS, const Twine &Name = "",
634 if (Constant *LC = dyn_cast<Constant>(LHS))
637 return CreateInsertNUWNSWBinOp(Instruction::Add, LHS, RHS, Name,
640 Value *CreateNSWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
641 return CreateAdd(LHS, RHS, Name, false, true);
643 Value *CreateNUWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
644 return CreateAdd(LHS, RHS, Name, true, false);
646 Value *CreateFAdd(Value *LHS, Value *RHS, const Twine &Name = "",
648 if (Constant *LC = dyn_cast<Constant>(LHS))
651 return Insert(AddFPMathAttributes(BinaryOperator::CreateFAdd(LHS, RHS),
654 Value *CreateSub(Value *LHS, Value *RHS, const Twine &Name = "",
656 if (Constant *LC = dyn_cast<Constant>(LHS))
659 return CreateInsertNUWNSWBinOp(Instruction::Sub, LHS, RHS, Name,
662 Value *CreateNSWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
663 return CreateSub(LHS, RHS, Name, false, true);
665 Value *CreateNUWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
666 return CreateSub(LHS, RHS, Name, true, false);
668 Value *CreateFSub(Value *LHS, Value *RHS, const Twine &Name = "",
670 if (Constant *LC = dyn_cast<Constant>(LHS))
673 return Insert(AddFPMathAttributes(BinaryOperator::CreateFSub(LHS, RHS),
676 Value *CreateMul(Value *LHS, Value *RHS, const Twine &Name = "",
678 if (Constant *LC = dyn_cast<Constant>(LHS))
681 return CreateInsertNUWNSWBinOp(Instruction::Mul, LHS, RHS, Name,
684 Value *CreateNSWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
685 return CreateMul(LHS, RHS, Name, false, true);
687 Value *CreateNUWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
688 return CreateMul(LHS, RHS, Name, true, false);
690 Value *CreateFMul(Value *LHS, Value *RHS, const Twine &Name = "",
692 if (Constant *LC = dyn_cast<Constant>(LHS))
695 return Insert(AddFPMathAttributes(BinaryOperator::CreateFMul(LHS, RHS),
698 Value *CreateUDiv(Value *LHS, Value *RHS, const Twine &Name = "",
700 if (Constant *LC = dyn_cast<Constant>(LHS))
704 return Insert(BinaryOperator::CreateUDiv(LHS, RHS), Name);
705 return Insert(BinaryOperator::CreateExactUDiv(LHS, RHS), Name);
707 Value *CreateExactUDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
708 return CreateUDiv(LHS, RHS, Name, true);
710 Value *CreateSDiv(Value *LHS, Value *RHS, const Twine &Name = "",
712 if (Constant *LC = dyn_cast<Constant>(LHS))
716 return Insert(BinaryOperator::CreateSDiv(LHS, RHS), Name);
717 return Insert(BinaryOperator::CreateExactSDiv(LHS, RHS), Name);
719 Value *CreateExactSDiv(Value *LHS, Value *RHS, const Twine &Name = "") {
720 return CreateSDiv(LHS, RHS, Name, true);
722 Value *CreateFDiv(Value *LHS, Value *RHS, const Twine &Name = "",
724 if (Constant *LC = dyn_cast<Constant>(LHS))
727 return Insert(AddFPMathAttributes(BinaryOperator::CreateFDiv(LHS, RHS),
730 Value *CreateURem(Value *LHS, Value *RHS, const Twine &Name = "") {
731 if (Constant *LC = dyn_cast<Constant>(LHS))
734 return Insert(BinaryOperator::CreateURem(LHS, RHS), Name);
736 Value *CreateSRem(Value *LHS, Value *RHS, const Twine &Name = "") {
737 if (Constant *LC = dyn_cast<Constant>(LHS))
740 return Insert(BinaryOperator::CreateSRem(LHS, RHS), Name);
742 Value *CreateFRem(Value *LHS, Value *RHS, const Twine &Name = "",
744 if (Constant *LC = dyn_cast<Constant>(LHS))
747 return Insert(AddFPMathAttributes(BinaryOperator::CreateFRem(LHS, RHS),
751 Value *CreateShl(Value *LHS, Value *RHS, const Twine &Name = "",
753 if (Constant *LC = dyn_cast<Constant>(LHS))
756 return CreateInsertNUWNSWBinOp(Instruction::Shl, LHS, RHS, Name,
759 Value *CreateShl(Value *LHS, const APInt &RHS, const Twine &Name = "",
761 return CreateShl(LHS, ConstantInt::get(LHS->getType(), RHS), Name,
764 Value *CreateShl(Value *LHS, uint64_t RHS, const Twine &Name = "",
766 return CreateShl(LHS, ConstantInt::get(LHS->getType(), RHS), Name,
770 Value *CreateLShr(Value *LHS, Value *RHS, const Twine &Name = "",
772 if (Constant *LC = dyn_cast<Constant>(LHS))
776 return Insert(BinaryOperator::CreateLShr(LHS, RHS), Name);
777 return Insert(BinaryOperator::CreateExactLShr(LHS, RHS), Name);
779 Value *CreateLShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
781 return CreateLShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact);
783 Value *CreateLShr(Value *LHS, uint64_t RHS, const Twine &Name = "",
785 return CreateLShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact);
788 Value *CreateAShr(Value *LHS, Value *RHS, const Twine &Name = "",
790 if (Constant *LC = dyn_cast<Constant>(LHS))
794 return Insert(BinaryOperator::CreateAShr(LHS, RHS), Name);
795 return Insert(BinaryOperator::CreateExactAShr(LHS, RHS), Name);
797 Value *CreateAShr(Value *LHS, const APInt &RHS, const Twine &Name = "",
799 return CreateAShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact);
801 Value *CreateAShr(Value *LHS, uint64_t RHS, const Twine &Name = "",
803 return CreateAShr(LHS, ConstantInt::get(LHS->getType(), RHS), Name,isExact);
806 Value *CreateAnd(Value *LHS, Value *RHS, const Twine &Name = "") {
809 return LHS; // LHS & -1 -> LHS
810 if (Constant *LC = dyn_cast<Constant>(LHS))
813 return Insert(BinaryOperator::CreateAnd(LHS, RHS), Name);
815 Value *CreateAnd(Value *LHS, const APInt &RHS, const Twine &Name = "") {
816 return CreateAnd(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
818 Value *CreateAnd(Value *LHS, uint64_t RHS, const Twine &Name = "") {
819 return CreateAnd(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
822 Value *CreateOr(Value *LHS, Value *RHS, const Twine &Name = "") {
825 return LHS; // LHS | 0 -> LHS
826 if (Constant *LC = dyn_cast<Constant>(LHS))
829 return Insert(BinaryOperator::CreateOr(LHS, RHS), Name);
831 Value *CreateOr(Value *LHS, const APInt &RHS, const Twine &Name = "") {
832 return CreateOr(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
834 Value *CreateOr(Value *LHS, uint64_t RHS, const Twine &Name = "") {
835 return CreateOr(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
838 Value *CreateXor(Value *LHS, Value *RHS, const Twine &Name = "") {
839 if (Constant *LC = dyn_cast<Constant>(LHS))
842 return Insert(BinaryOperator::CreateXor(LHS, RHS), Name);
844 Value *CreateXor(Value *LHS, const APInt &RHS, const Twine &Name = "") {
845 return CreateXor(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
847 Value *CreateXor(Value *LHS, uint64_t RHS, const Twine &Name = "") {
848 return CreateXor(LHS, ConstantInt::get(LHS->getType(), RHS), Name);
852 Value *LHS, Value *RHS, const Twine &Name = "",
854 if (Constant *LC = dyn_cast<Constant>(LHS))
857 llvm::Instruction *BinOp = BinaryOperator::Create(Opc, LHS, RHS);
1232 Value *CreateICmpEQ(Value *LHS, Value *RHS, const Twine &Name = "") {
1233 return CreateICmp(ICmpInst::ICMP_EQ, LHS, RHS, Name);
1235 Value *CreateICmpNE(Value *LHS, Value *RHS, const Twine &Name = "") {
1236 return CreateICmp(ICmpInst::ICMP_NE, LHS, RHS, Name);
1238 Value *CreateICmpUGT(Value *LHS, Value *RHS, const Twine &Name = "") {
1239 return CreateICmp(ICmpInst::ICMP_UGT, LHS, RHS, Name);
1241 Value *CreateICmpUGE(Value *LHS, Value *RHS, const Twine &Name = "") {
1242 return CreateICmp(ICmpInst::ICMP_UGE, LHS, RHS, Name);
1244 Value *CreateICmpULT(Value *LHS, Value *RHS, const Twine &Name = "") {
1245 return CreateICmp(ICmpInst::ICMP_ULT, LHS, RHS, Name);
1247 Value *CreateICmpULE(Value *LHS, Value *RHS, const Twine &Name = "") {
1248 return CreateICmp(ICmpInst::ICMP_ULE, LHS, RHS, Name);
1250 Value *CreateICmpSGT(Value *LHS, Value *RHS, const Twine &Name = "") {
1251 return CreateICmp(ICmpInst::ICMP_SGT, LHS, RHS, Name);
1253 Value *CreateICmpSGE(Value *LHS, Value *RHS, const Twine &Name = "") {
1254 return CreateICmp(ICmpInst::ICMP_SGE, LHS, RHS, Name);
1256 Value *CreateICmpSLT(Value *LHS, Value *RHS, const Twine &Name = "") {
1257 return CreateICmp(ICmpInst::ICMP_SLT, LHS, RHS, Name);
1259 Value *CreateICmpSLE(Value *LHS, Value *RHS, const Twine &Name = "") {
1260 return CreateICmp(ICmpInst::ICMP_SLE, LHS, RHS, Name);
1263 Value *CreateFCmpOEQ(Value *LHS, Value *RHS, const Twine &Name = "") {
1264 return CreateFCmp(FCmpInst::FCMP_OEQ, LHS, RHS, Name);
1266 Value *CreateFCmpOGT(Value *LHS, Value *RHS, const Twine &Name = "") {
1267 return CreateFCmp(FCmpInst::FCMP_OGT, LHS, RHS, Name);
1269 Value *CreateFCmpOGE(Value *LHS, Value *RHS, const Twine &Name = "") {
1270 return CreateFCmp(FCmpInst::FCMP_OGE, LHS, RHS, Name);
1272 Value *CreateFCmpOLT(Value *LHS, Value *RHS, const Twine &Name = "") {
1273 return CreateFCmp(FCmpInst::FCMP_OLT, LHS, RHS, Name);
1275 Value *CreateFCmpOLE(Value *LHS, Value *RHS, const Twine &Name = "") {
1276 return CreateFCmp(FCmpInst::FCMP_OLE, LHS, RHS, Name);
1278 Value *CreateFCmpONE(Value *LHS, Value *RHS, const Twine &Name = "") {
1279 return CreateFCmp(FCmpInst::FCMP_ONE, LHS, RHS, Name);
1281 Value *CreateFCmpORD(Value *LHS, Value *RHS, const Twine &Name = "") {
1282 return CreateFCmp(FCmpInst::FCMP_ORD, LHS, RHS, Name);
1284 Value *CreateFCmpUNO(Value *LHS, Value *RHS, const Twine &Name = "") {
1285 return CreateFCmp(FCmpInst::FCMP_UNO, LHS, RHS, Name);
1287 Value *CreateFCmpUEQ(Value *LHS, Value *RHS, const Twine &Name = "") {
1288 return CreateFCmp(FCmpInst::FCMP_UEQ, LHS, RHS, Name);
1290 Value *CreateFCmpUGT(Value *LHS, Value *RHS, const Twine &Name = "") {
1291 return CreateFCmp(FCmpInst::FCMP_UGT, LHS, RHS, Name);
1293 Value *CreateFCmpUGE(Value *LHS, Value *RHS, const Twine &Name = "") {
1294 return CreateFCmp(FCmpInst::FCMP_UGE, LHS, RHS, Name);
1296 Value *CreateFCmpULT(Value *LHS, Value *RHS, const Twine &Name = "") {
1297 return CreateFCmp(FCmpInst::FCMP_ULT, LHS, RHS, Name);
1299 Value *CreateFCmpULE(Value *LHS, Value *RHS, const Twine &Name = "") {
1300 return CreateFCmp(FCmpInst::FCMP_ULE, LHS, RHS, Name);
1302 Value *CreateFCmpUNE(Value *LHS, Value *RHS, const Twine &Name = "") {
1303 return CreateFCmp(FCmpInst::FCMP_UNE, LHS, RHS, Name);
1306 Value *CreateICmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
1308 if (Constant *LC = dyn_cast<Constant>(LHS))
1311 return Insert(new ICmpInst(P, LHS, RHS), Name);
1313 Value *CreateFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
1315 if (Constant *LC = dyn_cast<Constant>(LHS))
1318 return Insert(new FCmpInst(P, LHS, RHS), Name);
1445 Value *CreatePtrDiff(Value *LHS, Value *RHS, const Twine &Name = "") {
1446 assert(LHS->getType() == RHS->getType() &&
1448 PointerType *ArgType = cast<PointerType>(LHS->getType());
1449 Value *LHS_int = CreatePtrToInt(LHS, Type::getInt64Ty(Context));