@@ -1575,14 +1575,10 @@ class IRBuilderBase {
15751575 return Accum;
15761576 }
15771577
1578- Value *CreateOr (Value *LHS, Value *RHS, const Twine &Name = " " ,
1579- bool IsDisjoint = false ) {
1578+ Value *CreateOr (Value *LHS, Value *RHS, const Twine &Name = " " ) {
15801579 if (auto *V = Folder.FoldBinOp (Instruction::Or, LHS, RHS))
15811580 return V;
1582- return Insert (
1583- IsDisjoint ? BinaryOperator::CreateDisjoint (Instruction::Or, LHS, RHS)
1584- : BinaryOperator::CreateOr (LHS, RHS),
1585- Name);
1581+ return Insert (BinaryOperator::CreateOr (LHS, RHS), Name);
15861582 }
15871583
15881584 Value *CreateOr (Value *LHS, const APInt &RHS, const Twine &Name = " " ) {
@@ -1727,6 +1723,18 @@ class IRBuilderBase {
17271723 return Insert (BinOp, Name);
17281724 }
17291725
1726+ Value *CreateBinOpDisjoint (BinaryOperator::BinaryOps Opc, Value *LHS,
1727+ Value *RHS, bool IsDisjoint,
1728+ const Twine &Name = " " ) {
1729+ if (Value *V = Folder.FoldBinOp (Opc, LHS, RHS))
1730+ return V;
1731+
1732+ BinaryOperator *BO =
1733+ Insert (BinaryOperator::CreateDisjoint (Opc, LHS, RHS), Name);
1734+ cast<PossiblyDisjointInst>(BO)->setIsDisjoint (IsDisjoint);
1735+ return BO;
1736+ }
1737+
17301738 Value *CreateLogicalAnd (Value *Cond1, Value *Cond2, const Twine &Name = " " ) {
17311739 assert (Cond2->getType ()->isIntOrIntVectorTy (1 ));
17321740 return CreateSelect (Cond1, Cond2,
0 commit comments