summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2020-01-14 14:19:02 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2020-01-14 14:21:17 +0100
commit6aca3e8dfa228fb75e410e34db74982a0ab3939f (patch)
tree02c68a575b11577d8491c80c4545c60254be1d4c /llvm
parentdee6e39c7561a8b733cc260738ff7ea3ae78ee0c (diff)
downloadbcm5719-llvm-6aca3e8dfa228fb75e410e34db74982a0ab3939f.tar.gz
bcm5719-llvm-6aca3e8dfa228fb75e410e34db74982a0ab3939f.zip
[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.
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/IR/IRBuilder.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 90353365a96..a6252b29800 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -2361,6 +2361,9 @@ public:
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 differs 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 @@ public:
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 differs from CreateFCmp only if IsFPConstrained is true.
Value *CreateFCmpS(CmpInst::Predicate P, Value *LHS, Value *RHS,
const Twine &Name = "", MDNode *FPMathTag = nullptr) {
if (IsFPConstrained)
OpenPOWER on IntegriCloud