[PATCH] D156989: FloatingPointMode: Use -1 for "Dynamic"

2023-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. `Dynamic` cannot have value `-1`, its value must fits 3 bits. Some targets encode rounding mode in instructions, RISCV is an example. It allows five "real" rounding modes, enlisted now in `RoundingMode` to be specified in a special field or FP instruction. This field

[PATCH] D157911: clang: Add __builtin_exp10* and use new llvm.exp10 intrinsic

2023-09-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157911/new/ https://reviews.llvm.org/D157911 ___ cfe-commits mailing list

[PATCH] D157072: [clang][ExprConst] Check float operation input for signaling NaNs

2023-09-04 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/CXX/expr/expr.const/p2-0x.cpp:281-283 +constexpr float f10 = f2 - f2; +constexpr float f11 = f2 + f4; +constexpr float f12 = f2 / f2; I don't think silent NaN origination is a right behavior. By

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-09-01 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9fd57e4d4888: [clang] Support vectors in __builtin_isfpclass (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-08-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 554750. sepavloff added a comment. Update documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153339/new/ https://reviews.llvm.org/D153339 Files: clang/docs/LanguageExtensions.rst

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-08-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 553960. sepavloff added a comment. Fix documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153339/new/ https://reviews.llvm.org/D153339 Files: clang/docs/LanguageExtensions.rst

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-08-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D153339#4489025 , @aaron.ballman wrote: > This seems reasonable to me, but I do wonder if changing the return type from > int to bool will cause surprises for anyone. I see why it's done, but this > seems more like a C

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-08-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 553908. sepavloff added a comment. Herald added a subscriber: sunshaoce. Use representation of logical vectors similar to OpenCL Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153339/new/

[PATCH] D158158: [clang] Set FP options in Sema when instantiating CompoundStmt

2023-08-20 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0baf85c33109: [clang] Set FP options in Sema when instantiating CompoundStmt (authored by sepavloff). Changed prior to commit:

[PATCH] D158158: [clang] Set FP options in Sema when instantiating CompoundStmt

2023-08-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, aaron.ballman, efriedma, zahiraam. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. When an expression is instantiated, TreeTransform skips ImplicitCastExpr nodes,

[PATCH] D156989: FloatingPointMode: Use -1 for "Dynamic"

2023-08-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D156989#4558134 , @arsenm wrote: > In D156989#4558133 , @sepavloff > wrote: > >> Rounding mode is presented in FPOptions with 3 bits, so there is only 8 >> values available for

[PATCH] D156989: FloatingPointMode: Use -1 for "Dynamic"

2023-08-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Rounding mode is presented in FPOptions with 3 bits, so there is only 8 values available for particular modes. 5 of them, which are specified in IEEE-754, are listed in `RoundingMode`. `Dynamic` (which is -1 in 3-bit numbers) is not a real rounding mode, it

[PATCH] D155380: [clang] Fix delayed template parsing

2023-07-17 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcc006acdd6d7: [clang] Fix delayed template parsing (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155380/new/

[PATCH] D155380: [clang] Fix delayed template parsing

2023-07-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 540861. sepavloff added a comment. Fix clang-format errors Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155380/new/ https://reviews.llvm.org/D155380 Files: clang/include/clang/Sema/Sema.h

[PATCH] D155380: [clang] Fix delayed template parsing

2023-07-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 540764. sepavloff added a comment. Use calculated default FP options Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155380/new/ https://reviews.llvm.org/D155380 Files: clang/include/clang/Sema/Sema.h

[PATCH] D155380: [clang] Fix delayed template parsing

2023-07-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, aaron.ballman, efriedma, mgorny. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. Commit 98390ccb80569e8fbb20e6c996b4b8cff87fbec6

[PATCH] D154359: [clang] Reset FP options before template instantiation

2023-07-12 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfde5924dcc69: [clang] Reset FP options before template instantiation (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154359/new/

[PATCH] D154359: [clang] Reset FP options before template instantiation

2023-07-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/CodeGen/fp-template.cpp:28 +// CHECK-LABEL: define {{.*}} float @_ZN7PR6354211stable_sortIiEEffT_( +// CHECK: fadd float + zahiraam wrote: > Shouldn't we be expecting a constraint add here? Yes, you

[PATCH] D154359: [clang] Reset FP options before template instantiation

2023-07-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 539597. sepavloff added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154359/new/ https://reviews.llvm.org/D154359 Files: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2023-07-11 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7d6c2e18114d: [clang] Use llvm.is_fpclass to implement FP classification functions (authored by sepavloff). Changed prior to commit:

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-07-10 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153339/new/ https://reviews.llvm.org/D153339 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-07-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143241#4475741 , @Jake-Egan wrote: > Hi, the following assertion is getting tripped on AIX: > > Assertion failed: *FpPragmaCurrentValue == > SemaObj->FpPragmaStack.DefaultValue && "Expected a default pragma >

[PATCH] D154359: [clang] Reset FP options before template instantiation

2023-07-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, aaron.ballman, efriedma. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. AST nodes that may depend on FP options keep them as a difference relative to the options

[PATCH] D129464: [Clang][CodeGen] Set FP options of builder at entry to compound statement

2023-06-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. After implementation of D142001 and D143241 this patch is not neded anymore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129464/new/

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-28 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG98390ccb8056: [Clang] Reset FP options before function instantiations (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143241#4441812 , @rjmccall wrote: > Hmm. Why are we clearing the FP pragma stack instead of saving the old > context onto it and then restoring after instantiation? I don't think > semantic analysis ever depends on

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Parse/ParseTemplate.cpp:1736 + // point of the template definition. + Actions.resetFPOptions(LPT.FPO); + rjmccall wrote: > Ah, is this bug specific to the MSVC-compatible template logic? Exactly. This is

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143241/new/ https://reviews.llvm.org/D143241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D153339: [clang] Support vectors in __builtin_isfpclass

2023-06-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, aaron.ballman, arsenm, kpn, qiucf, efriedma. Herald added a project: All. sepavloff requested review of this revision. Herald added a subscriber: wdng. Herald added a project: clang. Builtin function `__builtin_isfpclass` now

[PATCH] D144802: clang: Add __builtin_elementwise_round

2023-06-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144802/new/ https://reviews.llvm.org/D144802 ___ cfe-commits mailing list

[PATCH] D153233: clang: Add __builtin_elementwise_rint and nearbyint

2023-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:656 + T __builtin_elementwise_nearbyint(T x) round x to the nearest integer value in floating point format, floating point types + rounding

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7dd387d2971d: [clang] Add __builtin_isfpclass (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D152351?vs=530772=532477#toc Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152351/new/ https://reviews.llvm.org/D152351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 2 inline comments as done. sepavloff added inline comments. Comment at: clang/test/CodeGen/isfpclass.c:2 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -S -O1 -emit-llvm %s -o - | FileCheck %s + +_Bool check_isfpclass_finite(float x) { arsenm

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 530772. sepavloff added a comment. Herald added subscribers: aheejin, dschuff. Updated patch - Added named constants for data classes, - Fixed documentation, - Changed test for generated IR. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked 8 inline comments as done. sepavloff added a comment. In D152351#4403904 , @aaron.ballman wrote: > In D152351#4402785 , @arsenm wrote: > >> Also should get mentioned in the builtin docs and

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 530041. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152351/new/ https://reviews.llvm.org/D152351 Files: clang/docs/LanguageExtensions.rst

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D152351#4402615 , @qiucf wrote: > It's necessary to check range of first argument in `SemaChecking.cpp` using > `SemaBuiltinConstantArgRange`. > > _Bool check_isfpclass_1(float x) { return __builtin_isfpclass(123456, x);

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 529243. sepavloff added a comment. Add check for test bit mask value Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152351/new/ https://reviews.llvm.org/D152351 Files:

[PATCH] D152351: [clang] Add __builtin_isfpclass

2023-06-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, aaron.ballman, arsenm, kpn, qiucf, efriedma. Herald added a subscriber: hiraditya. Herald added a project: All. sepavloff requested review of this revision. Herald added subscribers: llvm-commits, wdng. Herald added projects:

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2023-06-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 529156. sepavloff added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Add createIsFPClass to IRBuilder Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112932/new/

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-06-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 527800. sepavloff added a comment. Use FPOptions from the place where template is defined rather than default Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143241/new/ https://reviews.llvm.org/D143241

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3288 +This builtin is restrcted to work on x86 and arm targets currently. When support +for the builtin is added for new targets, the manual should be updated accordingly. +

[PATCH] D146188: [Clang][DOC] Add documentation in for __builtin_flt_rounds and __builtin_set_flt_rounds

2023-03-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3293 +This builtin is converted to llvm.set.rounding intrinsic in LLVM IR level +and not all targets support this intrinsic, so only x86 and arm targets +support this builtin. Since this builtin

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-06 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144454/new/ https://reviews.llvm.org/D144454 ___ cfe-commits mailing list

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D144454#4163688 , @rjmccall wrote: > I see. If we're going to take the target-independent values specified by > `FLT_ROUNDS`, then the original builtin name is more appropriate. Of course, > this has the disadvantage of

[PATCH] D144454: Add builtin for llvm set rounding

2023-03-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. C standard function `fesetround` accepts rounding mode in the form of target-specific values like `FE_TONEAREST`. They usually represent corresponding bits in control register, so are different for different targets. `llvm.set_rounding` in contrast accepts rounding

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5cc91f977eaa: [Clang] Copy strictfp attribute from pattern to instantiation (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143919/new/ https://reviews.llvm.org/D143919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:824 + continue; +} + efriedma wrote: > sepavloff wrote: > > efriedma wrote: > > > Is this necessary? The non-delayed-parsed case seems to work correctly > > >

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 498248. sepavloff added a comment. Remove copying StrictFPAttr from InstantiateAttrs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143919/new/ https://reviews.llvm.org/D143919 Files:

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143919#4130178 , @efriedma wrote: > If the "strictfp" attribute is based on the contents of the function body, > should we recompute it when the function is instantiated, as opposed to > copying it? For example, say you

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143919#4123922 , @rjmccall wrote: > In D143919#4123712 , @sepavloff > wrote: > >> In D143919#4123616 , @efriedma >> wrote: >> >>> We have

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 497609. sepavloff added a comment. Changed the way to copy strictfp attribute Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143919/new/ https://reviews.llvm.org/D143919 Files:

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D143919#4123616 , @efriedma wrote: > We have code somewhere to generically copy attributes from function templates > to instantiations, right? Why do we need to explicitly copy StrictFPAttr in > particular, separate from

[PATCH] D143919: [Clang] Copy strictfp attribute from pattern to instantiation

2023-02-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, aaron.ballman, efriedma. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. If a template function contained a pragma that made it strictfp, code generation for such

[PATCH] D143241: [Clang] Reset FP options before function instantiations

2023-02-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, aaron.ballman, efriedma. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. Previously function template instantiations occurred with FP options that were in effect

[PATCH] D133325: [Driver] Allow search of included response files as configuration files

2023-02-02 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff abandoned this revision. sepavloff added a comment. The alternative solution in D136354 was implemented. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133325/new/ https://reviews.llvm.org/D133325

[PATCH] D141765: [FPEnv] Fix complex operations in strictfp mode

2023-01-24 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd595b59d5c9c: [FPEnv] Fix complex operations in strictfp mode (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D141765: [FPEnv] Fix complex operations in strictfp mode

2023-01-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141765/new/ https://reviews.llvm.org/D141765 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D141765: [FPEnv] Fix complex operations in strictfp mode

2023-01-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 491397. sepavloff added a comment. Use --implicit-check-not in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141765/new/ https://reviews.llvm.org/D141765 Files: clang/lib/CodeGen/CGExprComplex.cpp

[PATCH] D142001: [clang] Use FP options from AST for emitting code for casts

2023-01-20 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG65cf77d218cf: [clang] Use FP options from AST for emitting code for casts (authored by sepavloff). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D142001: [clang] Use FP options from AST for emitting code for casts

2023-01-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142001/new/ https://reviews.llvm.org/D142001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D142001: [clang] Use FP options from AST for emitting code for casts

2023-01-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 490504. sepavloff added a comment. Use --implicit-check-not in tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142001/new/ https://reviews.llvm.org/D142001 Files: clang/lib/CodeGen/CGExprScalar.cpp

[PATCH] D141765: [FPEnv] Fix complex operations in strictfp mode

2023-01-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D141765#4059214 , @kpn wrote: > Are we testing _Complex multiply or subtraction anywhere? I have a vague > memory of multiply not working correctly. There is a test `clang/test/CodeGen/complex-math.c` that checks complex

[PATCH] D141765: [FPEnv] Fix complex operations in strictfp mode

2023-01-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 490088. sepavloff added a comment. Updated comment in test as proposed by Kevin Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141765/new/ https://reviews.llvm.org/D141765 Files:

[PATCH] D142001: [clang] Use FP options from AST for emitting code for casts

2023-01-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, kpn, aaron.ballman. Herald added a subscriber: pengfei. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo

[PATCH] D140377: [clang][Interp] Compound assign operators for FP values

2023-01-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140377/new/ https://reviews.llvm.org/D140377

[PATCH] D141765: [FPEnv] Fix complex operations in strictfp mode

2023-01-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, kpn, aaron.ballman. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. Operations on floating-point complex data had incorrect FP attributes in strictfp mode, because

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2023-01-11 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 488159. sepavloff added a comment. Remove support of __builtin_is{subnormal,zero,signaling}, rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112932/new/ https://reviews.llvm.org/D112932 Files:

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2022-12-26 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 485307. sepavloff added a comment. Update patch - Rebase, - Add test that checks inlining. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112932/new/ https://reviews.llvm.org/D112932 Files:

[PATCH] D140294: clang: Replace implementation of __builtin_isnormal

2022-12-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. As mentioned in another review, using `fcmp` to represent `isnormal` in IR as well as any other classification function would result in incorrect code in strict mode. The source: inline __attribute__((always_inline)) _Bool func(float x) { return

[PATCH] D140294: clang: Replace implementation of __builtin_isnormal

2022-12-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. This change can have negative consequences in some cases. Some targets have dedicated instruction to test FP class and often this instruction is faster than arithmetic operations. Replacement of one operation with two arithmetic and two logic plus cost of FP constant

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2022-12-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 483994. sepavloff added a comment. Remove __builtin_isfpclass Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112932/new/ https://reviews.llvm.org/D112932 Files: clang/include/clang/Basic/Builtins.def

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-12-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 ___ cfe-commits mailing list

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-12-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:607 +if (*LT == PT_Float) { + if (!this->emitAddf(getRoundingMode(E), E)) +return false; As discussed previously, compound assign operator cannot be

[PATCH] D112932: Use llvm.is_fpclass to implement FP classification functions

2022-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/test/CodeGen/strictfp_builtins.c:160 +// CHECK-NEXT:[[TMP1:%.*]] = call double @llvm.fabs.f64(double [[TMP0]]) #[[ATTR5]] +// CHECK-NEXT:[[ISINF:%.*]] = call i1 @llvm.experimental.constrained.fcmp.f64(double [[TMP1]],

[PATCH] D112932: [WIP] Use llvm.is_fpclass to implement FP classification functions

2022-12-11 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 481901. sepavloff added a comment. Herald added a subscriber: pengfei. Prepare the patch for review In this patch the callback `TargetCodeGenInfo::testFPKind` is preserved, to make this change safer. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D139507: [Intrinsic] Add get.rounding as alias to flt.rounds and rename related DAG nodes

2022-12-08 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. LGTM. In D139507#3980555 , @qiucf wrote: > In D139507#3978449 , @sepavloff > wrote: > >> Thank you for working on this! >> >> Is there any reason why we should keep the old intrinsic?

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-12-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/Floating.h:109 +Floating RHS = B; +if (!A.compatibleWith(B)) + RHS = B.toSemantics(A, RM); tbaeder wrote: > sepavloff wrote: > > Do we really need this check? In AST operands of

[PATCH] D139507: [Intrinsic] Add get.rounding as alias to flt.rounds and rename related DAG nodes

2022-12-07 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you for working on this! Is there any reason why we should keep the old intrinsic? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139507/new/ https://reviews.llvm.org/D139507

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-12-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:152 + case CK_FloatingToIntegral: { +llvm::RoundingMode RM = getRoundingMode(CE); +Optional ToT = classify(CE->getType()); tbaeder wrote: > sepavloff wrote: > >

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:152 + case CK_FloatingToIntegral: { +llvm::RoundingMode RM = getRoundingMode(CE); +Optional ToT = classify(CE->getType()); According to C standard (6.3.1.4p1): ```

[PATCH] D138554: [clang][Interp] Use placement new to construct opcode arguments into bytecode vector

2022-11-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM. I would propose not to have a special case for trivially copyable types, if that is possible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138554: [clang][Interp] Use placement new to construct opcode arguments into bytecode vector

2022-11-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:166 if constexpr (!std::is_pointer_v) { -const char *Data = reinterpret_cast(); -Code.insert(Code.end(), Data, Data + Size); +if constexpr (std::is_trivially_copyable_v) { +

[PATCH] D138554: [clang][Interp] Use placement new to construct opcode arguments into bytecode vector

2022-11-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:166 if constexpr (!std::is_pointer_v) { -const char *Data = reinterpret_cast(); -Code.insert(Code.end(), Data, Data + Size); +if constexpr (std::is_trivially_copyable_v) { +

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D134859#3943926 , @tbaeder wrote: > FYI, I noticed the way the floating values are serialized doesn't work if the > `APFloat` heap-allocated anything; those values aren't preserved through > (de)serialization of course. >

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-16 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1ddd5863088b: [clang] Missed rounding mode use in constant evaluation (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D137719?vs=474304=475999#toc Repository: rG LLVM

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-16 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Comment at: clang/test/AST/const-fpfeatures.c:37 float _Complex C1d = C0; // CHECK: @C1d = {{.*}} { float, float } { float 1.00e+00, float 1.00e+00 } aaron.ballman wrote: > Should we add a test without the

[PATCH] D136354: [Driver] Enable nested configuration files

2022-11-15 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1f67dc8b7c22: [Driver] Enable nested configuration files (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D136354?vs=475400=475685#toc Repository: rG LLVM Github Monorepo

[PATCH] D136354: [Driver] Enable nested configuration files

2022-11-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136354/new/ https://reviews.llvm.org/D136354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D136354: [Driver] Enable nested configuration files

2022-11-15 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 475400. sepavloff added a comment. Missed changes in tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136354/new/ https://reviews.llvm.org/D136354 Files: clang/docs/UsersManual.rst

[PATCH] D136354: [Driver] Enable nested configuration files

2022-11-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 475349. sepavloff added a comment. Removed support of `--config file`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136354/new/ https://reviews.llvm.org/D136354 Files: clang/docs/UsersManual.rst

[PATCH] D136354: [Driver] Enable nested configuration files

2022-11-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136354/new/ https://reviews.llvm.org/D136354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137719/new/ https://reviews.llvm.org/D137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D136354: [Driver] Enable nested configuration files

2022-11-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 474455. sepavloff added a comment. Rebase patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136354/new/ https://reviews.llvm.org/D136354 Files: clang/docs/UsersManual.rst

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 474304. sepavloff added a comment. Remove accidentally added file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137719/new/ https://reviews.llvm.org/D137719 Files: clang/lib/AST/ExprConstant.cpp

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 474303. sepavloff added a comment. Removed unused parateters from HandleIntToFloatCast Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137719/new/ https://reviews.llvm.org/D137719 Files:

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Patch https://reviews.llvm.org/D137719 fixed int->float conversion. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134859/new/ https://reviews.llvm.org/D134859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D137719: [clang] Missed rounding mode use in constant evaluation

2022-11-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rjmccall, efriedma, aaron.ballman. Herald added a project: All. sepavloff requested review of this revision. Herald added a project: clang. Integer-to-float conversion was handled in constant evaluator with default rounding mode. This

  1   2   3   4   5   6   7   >