[llvm] 6aca3e8 - [FPEnv] Add some comments to IRBuilder.h
Ulrich Weigand via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 05:25:30 PST 2020
Author: Ulrich Weigand
Date: 2020-01-14T14:21:17+01:00
New Revision: 6aca3e8dfa228fb75e410e34db74982a0ab3939f
URL: https://github.com/llvm/llvm-project/commit/6aca3e8dfa228fb75e410e34db74982a0ab3939f
DIFF: https://github.com/llvm/llvm-project/commit/6aca3e8dfa228fb75e410e34db74982a0ab3939f.diff
LOG: [FPEnv] Add some comments to IRBuilder.h
As requested via post-commit comment for D71467, this adds comments
documenting CreateFCmp vs. CreateFCmpS to the header file.
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 90353365a964..a6252b298001 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -2361,6 +2361,9 @@ class IRBuilder : public IRBuilderBase, public Inserter {
return Insert(new ICmpInst(P, LHS, RHS), Name);
}
+ // Create a quiet floating-point comparison (i.e. one that raises an FP
+ // exception only in the case where an input is a signaling NaN).
+ // Note that this
diff ers from CreateFCmpS only if IsFPConstrained is true.
Value *CreateFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
const Twine &Name = "", MDNode *FPMathTag = nullptr) {
if (IsFPConstrained)
@@ -2373,6 +2376,9 @@ class IRBuilder : public IRBuilderBase, public Inserter {
return Insert(setFPAttrs(new FCmpInst(P, LHS, RHS), FPMathTag, FMF), Name);
}
+ // Create a signaling floating-point comparison (i.e. one that raises an FP
+ // exception whenever an input is any NaN, signaling or quiet).
+ // Note that this
diff ers from CreateFCmp only if IsFPConstrained is true.
Value *CreateFCmpS(CmpInst::Predicate P, Value *LHS, Value *RHS,
const Twine &Name = "", MDNode *FPMathTag = nullptr) {
if (IsFPConstrained)
More information about the llvm-commits
mailing list