[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-10-09 Thread Joao Moreira via Phabricator via cfe-commits
joaomoreira added a comment. I noticed that this commit breaks MUSL 1.2.0. Here is an isolated test-case that illustrates the issue: https://godbolt.org/z/6bdnEh Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87822/new/ https://reviews.llvm.org/D8

Re: [PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-29 Thread Serge Pavlov via cfe-commits
The change https://reviews.llvm.org/rG4e4f926e83cf removes the problematic test. Sorry for troubles. Thanks, --Serge On Wed, Sep 30, 2020 at 2:55 AM Petr Hosek via Phabricator < revi...@reviews.llvm.org> wrote: > phosek added a comment. > > In D87822#2301293

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-29 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D87822#2301293 , @sepavloff wrote: > In D87822#2301194 , @leonardchan > wrote: > >> Thanks for looking into it. We have that commit but it still seems to be >> failing for us with the sam

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D87822#2301194 , @leonardchan wrote: > Thanks for looking into it. We have that commit but it still seems to be > failing for us with the same error. In D88498 this test is removed because us

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Commented in that review, but that patch has the wrong fix: it's based on the targets LLVM is configured with rather than the current test target. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87822/new/ https://reviews.l

Re: [PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-29 Thread Leonard Chan via cfe-commits
Thanks for looking into it. We have that commit but it still seems to be failing for us with the same error. On Tue, Sep 29, 2020 at 12:58 AM Serge Pavlov wrote: > Hi! > > This issue must be fixed by: https://reviews.llvm.org/rGf91b9c0f9858 > Do you have recent changes from the trunk? > > Thanks

Re: [PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-29 Thread Serge Pavlov via cfe-commits
Hi! This issue must be fixed by: https://reviews.llvm.org/rGf91b9c0f9858 Do you have recent changes from the trunk? Thanks, --Serge On Tue, Sep 29, 2020 at 4:22 AM Leonard Chan via Phabricator < revi...@reviews.llvm.org> wrote: > leonardchan added a comment. > > Hi! It looks like this is causi

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi! It looks like this is causing a test failure on our aach64 builders (https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-arm64/b8868095822628984976?): [1113/1114] Running the Clang regression tests llvm-lit: /b/s/w/ir/k/staging/llvm_build/bin/../

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-26 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 rG6314f412a83d: [FPEnv] Evaluate constant expressions under non-default rounding modes (authored by sepavloff). Repository: rG LLVM Github Monorepo

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2438 +/// Check if the given evaluation result is allowed for constant evaluation. +static bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, + APFloat::opSta

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 294230. sepavloff added a comment. Added diagnostic message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87822/new/ https://reviews.llvm.org/D87822 Files: clang/include/clang/AST/Expr.h clang/include/cl

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-24 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2438 +/// Check if the given evaluation result is allowed for constant evaluation. +static bool checkFloatingPointResult(EvalInfo &Info, const Expr *E, + APFloat::opStatu

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-24 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/AST/ExprConstant.cpp:2427 +FPOptions FPFeatures = Cast->getFPFeaturesInEffect(Info.Ctx.getLangOpts()); +RM = FPFeatures.getRoundingMode(

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2427 +FPOptions FPFeatures = Cast->getFPFeaturesInEffect(Info.Ctx.getLangOpts()); +RM = FPFeatures.getRoundingMode(); + } rjmccall wrote: > sepavloff wrote: > > rjmccall wrote: >

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-24 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 293974. sepavloff marked an inline comment as done. sepavloff added a comment. Updated patch - improved Expr::getFPFeaturesInEffect, - added tests for _Complex, - added tests for constexpr, - added chech in HandleFloatToFloatCast, - implemented printing FPO

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-18 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2462 + return true; +} + Thanks, these look good. Comment at: clang/lib/AST/ExprConstant.cpp:2427 +FPOptions FPFeatures = Cast->getFPFeaturesInEffect(Info.Ctx.getLa

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2427 +FPOptions FPFeatures = Cast->getFPFeaturesInEffect(Info.Ctx.getLangOpts()); +RM = FPFeatures.getRoundingMode(); + } rjmccall wro

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 292841. sepavloff added a comment. Updated patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87822/new/ https://reviews.llvm.org/D87822 Files: clang/include/clang/AST/Expr.h clang/lib/AST/Expr.cpp cl

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:2427 +FPOptions FPFeatures = Cast->getFPFeaturesInEffect(Info.Ctx.getLangOpts()); +RM = FPFeatures.getRoundingMode(); + } I think the options really need to be passed in or else c

[PATCH] D87822: [FPEnv] Evaluate constant expressions under non-default rounding modes

2020-09-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, mibintc, kpn. Herald added a project: clang. sepavloff requested review of this revision. The change implements evaluation of constant floating point expressions under non-default rounding modes. The main objective was t