jcranmer-intel wrote:
Some thoughts of my own:
The decision being discussed here has two main repercussions:
* An attempt to use `INFINITY` gets a symbol-not-found error message, or it
gets whatever warning/error message we attach to `__builtin_inf()` in
`-ffinite-math-only` mode.
* Code that
jcranmer-intel wrote:
> We will need someone to go through and audit the libm-style intrinsics and
> make sure all optimizations of them are safe before we can switch over. Those
> are "unsafe by default" since the optimizers know about them already.
I've already been looking at all of the opt
jcranmer-intel wrote:
arsenm sums it up quite well, I think.
Personally, I dislike the FMF being on select/phi only somewhat less than I
dislike the function-level attributes, and I'd rather avoid needing to use them
if there's a better way forward. Because nnan/ninf induce poison, you can get
https://github.com/jcranmer-intel commented:
One thing I have noticed is that this does seem to more or less by accident
remove the IRC channel from the list of communication channels to which the
code of conduct and other policies applied.
I am on board with generally replacing use of IRC wit
@@ -388,27 +384,18 @@ Guidance for office hours hosts
from the list above.
-.. _IRC:
-
-IRC
+Discord
jcranmer-intel wrote:
You've removed the thing that lets you link to this section, if I'm recalling
my RST correctly.
https://github.com/llvm/llvm-p
https://github.com/jcranmer-intel edited
https://github.com/llvm/llvm-project/pull/114276
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3730,10 +3730,10 @@ Fast-Math Flags
LLVM IR floating-point operations (:ref:`fneg `, :ref:`fadd `,
:ref:`fsub `, :ref:`fmul `, :ref:`fdiv `,
-:ref:`frem `, :ref:`fcmp `), and :ref:`phi `,
-:ref:`select `, or :ref:`call ` instructions that return
-floating-point types may u
@@ -2994,6 +2994,29 @@ A "convergencectrl" operand bundle is only valid on a
``convergent`` operation.
When present, the operand bundle must contain exactly one value of token type.
See the :doc:`ConvergentOperations` document for details.
+.. _ob_fpe:
+
+Floating-point Envir
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 -verify -std=c2y -Wall -pedantic -emit-llvm -o - %s
+// RUN: %clang_cc1 -verify -Wall -pedantic -emit-llvm -o - %s
+// expected-no-diagnostics
+
+/* WG14 N3364: Yes
+ * Give consistent wording for SNAN initialization v3
+ *
+ * Ensure that init
https://github.com/jcranmer-intel approved this pull request.
https://github.com/llvm/llvm-project/pull/115332
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6784,6 +6784,12 @@ def warn_arc_lifetime_result_type : Warning<
"ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 "
"lifetime qualifier on return type is ignored">,
InGroup;
+def warn_excess_precision_not_supported : Warning<
+ "excess precisi
@@ -780,6 +780,25 @@ class ASTContext : public RefCountedBase {
const TargetInfo &getTargetInfo() const { return *Target; }
const TargetInfo *getAuxTargetInfo() const { return AuxTarget; }
+ const QualType GetHigherPrecisionFPType(QualType ElementType) const {
+const
https://github.com/jcranmer-intel approved this pull request.
https://github.com/llvm/llvm-project/pull/107397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jcranmer-intel commented:
You'll want to merge the fast-math flags, so that compiling with
-ffinite-math-only gets you nnan ninf nsz on the maxnum/minnum, rather than
just nsz.
https://github.com/llvm/llvm-project/pull/113133
___
c
https://github.com/jcranmer-intel approved this pull request.
I think there's some followup work needed to get this working in SelectionDAG
as well, but that can live in a separate patch (especially as we need to do a
followup pass in DAGCombine to check for flags on the fpext/fptrunc nodes).
@@ -0,0 +1,563 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --function-signature
+// RUN: %clang_cc1 -std=c++23 -triple x86_64-unknown-unknown -target-feature
+fullbf16 -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK
---
https://github.com/jcranmer-intel commented:
I haven't fully reviewed this, but here's some comments to start with:
https://github.com/llvm/llvm-project/pull/78503
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
@@ -470,8 +470,16 @@ static void InitializeStandardPredefinedMacros(const
TargetInfo &TI,
if (LangOpts.CPlusPlus26)
// FIXME: Use correct value for C++26.
Builder.defineMacro("__cplusplus", "202400L");
-else if (LangOpts.CPlusPlus23)
+else if (LangOpts.
@@ -132,6 +133,70 @@ template <> struct
llvm::DenseMapInfo {
return LHS == RHS;
}
};
+constexpr unsigned CXX23FloatRankToIndex(clang::BuiltinType::Kind Kind) {
+ switch (Kind) {
+ case clang::BuiltinType::Float16:
+return 0;
+ case clang::BuiltinType::BFloat16:
+
@@ -132,6 +133,70 @@ template <> struct
llvm::DenseMapInfo {
return LHS == RHS;
}
};
+constexpr unsigned CXX23FloatRankToIndex(clang::BuiltinType::Kind Kind) {
+ switch (Kind) {
+ case clang::BuiltinType::Float16:
+return 0;
+ case clang::BuiltinType::BFloat16:
+
https://github.com/jcranmer-intel edited
https://github.com/llvm/llvm-project/pull/78503
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -7670,27 +7739,68 @@ static FloatingRank getFloatingRank(QualType T) {
}
}
+/// C++23 6.8.5 [conv.rank]
/// getFloatingTypeOrder - Compare the rank of the two specified floating
/// point types, ignoring the domain of the type (i.e. 'double' ==
-/// '_Complex double').
https://github.com/jcranmer-intel edited
https://github.com/llvm/llvm-project/pull/121838
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jcranmer-intel wrote:
> As you still support the legacy format, could you please restrict this PR to
> only the parser changes, and leave the printer changes (and the mass test
> update they require) to a followup?
Sure, I can do it. I made them two separate in the commits partly for that
rea
jcranmer-intel wrote:
> do other tools like UBSan (etc) help users to find and fix the issues?
We don't yet have a reliable tool for sanitizing TBAA failures. There is a
project to do that (the TypeSanitizer, see
https://discourse.llvm.org/t/reviving-typesanitizer-a-sanitizer-to-catch-type-bas
@@ -357,6 +357,9 @@ class IRBuilderBase {
void setConstrainedFPCallAttr(CallBase *I) {
I->addFnAttr(Attribute::StrictFP);
+MemoryEffects ME = MemoryEffects::inaccessibleMemOnly();
jcranmer-intel wrote:
It should be possible to make `CallBase::getMem
@@ -0,0 +1,505 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++23 -triple x86_64-unknown-unknown
-target-feature +fullbf16 -verify -ast-dump %s | FileCheck %s
+#include
+_Float16 f16_val_1 = 1.0bf16; // expected-error {{cannot initialize a variable
of type '_Float16' with an rvalu
@@ -132,6 +133,70 @@ template <> struct
llvm::DenseMapInfo {
return LHS == RHS;
}
};
+constexpr unsigned CXX23FloatRankToIndex(clang::BuiltinType::Kind Kind) {
jcranmer-intel wrote:
This function appears to be unused now.
https://github.com/llvm/llvm-p
https://github.com/jcranmer-intel commented:
I think this concludes my full look at this PR. I don't fully have a grasp on
the mechanisms of C++ overload to comment on key parts of this patch.
This also doesn't implement enough of the hard cases of P1467R9 (namely
_Float32/_Float64) for me to
@@ -4446,6 +4455,73 @@ CompareStandardConversionSequences(Sema &S,
SourceLocation Loc,
? ImplicitConversionSequence::Better
: ImplicitConversionSequence::Worse;
+ // C++23 [over.ics.rank]p4b3:
+ // A conversion in either direction between float
@@ -7444,9 +7444,12 @@ isArithmeticArgumentPromotion(Sema &S, const
ImplicitCastExpr *ICE) {
From = VecTy->getElementType();
if (const auto *VecTy = To->getAs())
To = VecTy->getElementType();
- // It's a floating promotion if the source type is a lower rank.
- retu
https://github.com/jcranmer-intel edited
https://github.com/llvm/llvm-project/pull/78503
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11226,12 +11232,14 @@ void Sema::CheckImplicitConversion(Expr *E, QualType
T, SourceLocation CC,
DiagnoseImpCast(*this, E, T, CC, diag::warn_impcast_float_precision);
}
// ... or possibly if we're increasing rank, too
- else if (Order < 0) {
+
@@ -0,0 +1,49 @@
+// RUN %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
+// RUN -verify -complex-range=promoted -o - | FileCheck %s
+
+// RUN %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown \
+// RUN -verify=nopromotion -complex-range=promoted -target-fe
101 - 134 of 134 matches
Mail list logo