[llvm] fe9a4b5 - Fix build post-revert in 8d5a981a135a
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 7 16:59:22 PST 2021
Author: Mehdi Amini
Date: 2021-03-08T00:59:05Z
New Revision: fe9a4b55da7443c0ae308587cf86e4e31a0993c0
URL: https://github.com/llvm/llvm-project/commit/fe9a4b55da7443c0ae308587cf86e4e31a0993c0
DIFF: https://github.com/llvm/llvm-project/commit/fe9a4b55da7443c0ae308587cf86e4e31a0993c0.diff
LOG: Fix build post-revert in 8d5a981a135a
One commit introduced after the reverted change was using an API
introduced there, this is reintroducing the API, but not the original
broken change.
Added:
Modified:
llvm/include/llvm/IR/IRBuilder.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 8525e2e8ebc0..10f2d72817e6 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -1534,6 +1534,18 @@ class IRBuilderBase {
return Insert(BinOp, Name);
}
+ Value *CreateLogicalAnd(Value *Cond1, Value *Cond2, const Twine &Name = "") {
+ assert(Cond2->getType()->isIntOrIntVectorTy(1));
+ return CreateSelect(Cond1, Cond2,
+ ConstantInt::getNullValue(Cond2->getType()), Name);
+ }
+
+ Value *CreateLogicalOr(Value *Cond1, Value *Cond2, const Twine &Name = "") {
+ assert(Cond2->getType()->isIntOrIntVectorTy(1));
+ return CreateSelect(Cond1, ConstantInt::getAllOnesValue(Cond2->getType()),
+ Cond2, Name);
+ }
+
CallInst *CreateConstrainedFPBinOp(
Intrinsic::ID ID, Value *L, Value *R, Instruction *FMFSource = nullptr,
const Twine &Name = "", MDNode *FPMathTag = nullptr,
More information about the llvm-commits
mailing list