[PATCH] D154991: [FPEnv][TableGen] Add strictfp attribute to constrained intrinsics by default.

2023-07-12 Thread Kevin P. Neal 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 rG91f886a40d3f: [FPEnv][TableGen] Add strictfp attribute to constrained intrinsics by default. (authored by kpn). Repository: rG LLVM Github Monorep

[PATCH] D154991: [FPEnv][TableGen] Add strictfp attribute to constrained intrinsics by default.

2023-07-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 539204. kpn added a comment. Move test and change to round-tripping as requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154991/new/ https://reviews.llvm.org/D154991 Files: clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl llvm

[PATCH] D154991: [FPEnv][TableGen] Add strictfp attribute to constrained intrinsics by default.

2023-07-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: pengfei, chapuni, akshaykhadse, craig.topper, arsenm. Herald added a subscriber: jdoerfert. Herald added a project: All. kpn requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, wdng. Herald added projects: clang, LL

[PATCH] D144447: [Clang] Teach buildFMulAdd to peek through fneg to find fmul.

2023-02-23 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn accepted this revision. kpn 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/D17/new/ https://reviews.llvm.org/D17 ___ cfe-

[PATCH] D144447: [Clang] Teach buildFMulAdd to peek through fneg to find fmul.

2023-02-21 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3738 - assert(!(negMul && negAdd) && "Only one of negMul and negAdd should be set."); - Value *MulOp0 = MulOp->getOperand(0); If I'm reading this right it looks like the assert() wasn'

[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

2023-02-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. What's the plan for tying this to strictfp? Because I don't it should be tied to cases where we use the constrained intrinsics but the exceptions are ignored and the default rounding is in stated. Those instructions are supposed to behave the same as the non-constrained ins

[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

2023-02-01 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: llvm/test/Transforms/Inline/AMDGPU/inline-denormal-fp-math.ll:78 +; CHECK-NEXT:[[CALL:%.*]] = call i32 @func_default() +; CHECK-NEXT:ret i32 [[CALL]] ; arsenm wrote: > kpn wrote: > > Are we changing the behavior in

[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

2023-02-01 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. We use "dynamic" for the constrained intrinsics. I'd stay consistent with our terminology and stick with "dynamic" here. I like the amount of testing. You may have gotten every single combination of cases, but I didn't go far enough to check. Comment at:

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

2023-01-17 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/test/CodeGen/complex-strictfp.c:8-9 // Include rounding metadata in the testing. -// FIXME: All cases of "fpexcept.maytrap" in this test are wrong. -// FIXME: All cases of "round.tonearest" in this test are wrong. +// All cases of "fp

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

2023-01-17 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Are we testing _Complex multiply or subtraction anywhere? I have a vague memory of multiply not working correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141765/new/ https://reviews.llvm.org/D141765 ___

[PATCH] D139629: clang: Stop emitting "strictfp"

2022-12-19 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2135 -llvm::AttrBuilder FuncAttrs(F->getContext()); -FuncAttrs.addAttribute("strictfp"); -F->addFnAttrs(FuncAttrs); arsenm wrote: > kpn wrote: > > arsenm wrote: > > > andrew.w.

[PATCH] D139629: clang: Stop emitting "strictfp"

2022-12-19 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2135 -llvm::AttrBuilder FuncAttrs(F->getContext()); -FuncAttrs.addAttribute("strictfp"); -F->addFnAttrs(FuncAttrs); arsenm wrote: > andrew.w.kaylor wrote: > > arsenm wrote: > >

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

2022-12-13 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn 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]], double

[PATCH] D139629: clang: Stop emitting "strictfp"

2022-12-08 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. It looks like clang does have at least one test that checks for the strictfp attribute on function definitions. We also have a number that test for the strictfp attribute on function calls. So I think our test coverage is in good shape. LGTM. CHANGES SINCE LAST ACTION

[PATCH] D126364: Fix interaction of pragma FENV_ACCESS with other pragmas

2022-06-01 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. >> On targets that support static rounding mode (like RISCV) dynamic and >> constant rounding modes may be different and the behavior changes if default >> mode is replaced by dynamic. > > Whether a target supports static rounding modes on floating-point > instructions is c

[PATCH] D118259: [AArch64] Adjust aarch64 constrained intrinsics tests and un-XFAIL

2022-04-12 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn accepted this revision. kpn added a comment. This revision is now accepted and ready to land. I trust you on the instruction set changes. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118259/new/ https://reviews.llvm.org/D118259 ___

[PATCH] D118259: [AArch64] Adjust aarch64-neon-intrinsics-constrained test and un-XFAIL

2022-03-17 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D118259#3389246 , @fhahn wrote: > In D118259#3389235 , @kpn wrote: > >> It's been a while, but I think the aarch64-neon-intrinsics-constrained.c >> test is trimmed down from the aarch64-ne

[PATCH] D118259: [AArch64] Adjust aarch64-neon-intrinsics-constrained test and un-XFAIL

2022-03-17 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. It's been a while, but I think the aarch64-neon-intrinsics-constrained.c test is trimmed down from the aarch64-neon-intrinsics.c test. Shouldn't the constrained and non-constrained end-to-end tests be treated the same? Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D115804: [CodeGen] use saturating FP casts when compiling with "no-strict-float-cast-overflow"

2021-12-21 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D115804#3202479 , @sepavloff wrote: > In D115804#3201681 , @spatel wrote: > >> In D115804#3201044 , @craig.topper >> wrote: >> >>> What's the plan

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-23 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D104854#2959680 , @thopre wrote: > In D104854#2957735 , @kpn wrote: > >> In D104854#2957490 , @lebedev.ri >> wrote: >> >>> In D104854#2957471

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-20 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D104854#2957490 , @lebedev.ri wrote: > In D104854#2957471 , @sepavloff > wrote: > >> In D104854#2957423 , @spatel wrote: >> >>> Is it intentional

[PATCH] D99675: RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level

2021-05-18 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D99675#2696327 , @pengfei wrote: > In D99675#2695424 , @kpn wrote: > >> What changes are needed for a backend, and what happens if they aren't done? > > As far as I understand it, backend doe

[PATCH] D100834: Bug 49739 - [Matrix] Support #pragma clang fp

2021-04-20 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. I don't know the matrix implementation so I can't swear this hits every place needed, but the uses of CGFPOptionsRAII in this patch look correct at least. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100834/new/ https://revie

[PATCH] D100118: [clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-04-20 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2844 + return RValue::get( + Builder.CreateArithmeticFence(ArgValue, ConvertType(ArgType))); +return RValue::get(ArgValue); Does this say that the fence will be silently drop

[PATCH] D99675: RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D99675#2695480 , @mibintc wrote: > In D99675#2695424 , @kpn wrote: > >> What changes are needed for a backend, and what happens if they aren't done? > > In the clang patch, I'm planning to ad

[PATCH] D99675: RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. What changes are needed for a backend, and what happens if they aren't done? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99675/new/ https://reviews.llvm.org/D99675 ___ cfe-commits

[PATCH] D100118: [clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D100118#2695365 , @kpn wrote: > I thought that adding a new fence required changing every optimization pass > in LLVM. That's why the constrained intrinsics were implemented they way they > are where no fence is needed. > > Aren'

[PATCH] D100118: [clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. I thought that adding a new fence required changing every optimization pass in LLVM. That's why the constrained intrinsics were implemented they way they are where no fence is needed. Aren't you going to have miscompiles using this new fence until all that optimization wor

[PATCH] D98923: [Driver] Pass -fexperimental-strict-floating-point to cc1 if it is specified

2021-03-19 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Test case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98923/new/ https://reviews.llvm.org/D98923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D97125: Stop traping on sNaN in __builtin_isinf

2021-02-22 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. System/Z's TEST DATA CLASS instruction covers most (all?) of the possible FP value states. You might want to subscribe, or add as a reviewer, jonpa just to make sure everyone stays in sync. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-05 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn accepted this revision. kpn 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/D95948/new/ https://reviews.llvm.org/D95948 ___ cfe-com

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-04 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D95948#2542884 , @mibintc wrote: > Should we add tests for mlong-double-64, -80, -128? Assuming Ty->getScalarSizeInBits() returns 64, 80, or 128 in those cases, I think it's good enough to just add an AArch64 (or some other 128-bi

[PATCH] D95948: Stop traping on sNaN in __builtin_isnan

2021-02-04 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. This looks like a definite step forward. Thank you! Can you do an AArch64 test case showing long double? Right now there's no 128-bit test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95948/new/ https://reviews.llvm.or

[PATCH] D94614: [FPEnv][X86] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

2021-02-03 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG81b69879c946: [FPEnv][X86] Platform builtins edition: clang should get from the AST the… (authored by kpn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D946

[PATCH] D94614: [FPEnv][X86] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

2021-01-22 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 318567. kpn added a comment. Update for review comments: Move uses of CGFPOptionsRAII lower and closer to where they are needed. This should be less error prone as well. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94614/new/ https://reviews.llvm.org/

[PATCH] D94614: [FPEnv][X86] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

2021-01-19 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:12268 + case X86::BI__builtin_ia32_cvtqq2pd512_mask: { +CodeGenFunction::CGFPOptionsRAII FPOptsRAII(*this, E); return EmitX86ConvertIntToFp(*this, Ops, /*IsSigned*/true); pengfei wro

[PATCH] D94614: [FPEnv][X86] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

2021-01-14 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. This doesn't add metadata to llvm intrinsics that are not constrained. The metadata is added by the IRBuilder when the IRBuilder is used to add constrained intrinsics. When adding non-constrained intrinsics that have a direct mapping to constrained intrinsics, and constrain

[PATCH] D94614: [FPEnv][X86] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

2021-01-13 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: craig.topper, andrew.w.kaylor. kpn added a project: clang. Herald added a subscriber: pengfei. kpn requested review of this revision. Herald added a subscriber: cfe-commits. Currently clang is not correctly retrieving from the AST the metadata for c

[PATCH] D94186: [FPEnv][PowerPC] Platform builtins edition: clang should get from the AST the metadata for constrained FP builtins

2021-01-06 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: steven.zhang, nemanjai. kpn added a project: clang. Herald added subscribers: shchenz, kbarton. kpn requested review of this revision. Herald added a subscriber: cfe-commits. Currently clang is not correctly retrieving from the AST the metadata for

[PATCH] D93134: [FPEnv] Teach the IRBuilder about invoke's correct use of the strictfp attribute.

2020-12-15 Thread Kevin P. Neal 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 rG67a1ffd88ac0: [FPEnv] Teach the IRBuilder about invoke's correct use of the strictfp… (authored by kpn). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D93134: [FPEnv] Teach the IRBuilder about invoke's correct use of the strictfp attribute.

2020-12-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: spatel, rjmccall, andrew.w.kaylor, mibintc, sepavloff. kpn requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Similar to D69312 , and documented

[PATCH] D92596: [FPEnv] Correct constrained metadata in fp16-ops-strict.c

2020-12-08 Thread Kevin P. Neal 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 rGacd4950d4f1e: [FPEnv] Correct constrained metadata in fp16-ops-strict.c (authored by kpn). Changed prior to commit: https://reviews.llvm.org/D9259

[PATCH] D92596: [FPEnv] Correct constrained metadata in fp16-ops-strict.c

2020-12-07 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3006 + CodeGenFunction::CGFPOptionsRAII FPOptsRAII(CGF, OpInfo.FPFeatures); SourceLocation Loc = E->getExprLoc(); mibintc wrote: > kpn wrote: > > mibintc wrote: > > > What's the rule

[PATCH] D92596: [FPEnv] Correct constrained metadata in fp16-ops-strict.c

2020-12-07 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2992 // floating point environment in the loop. +//XXX true? llvm::BasicBlock *startBB = Builder.GetInsertBlock(); mibintc wrote: > did you mean to leave this here? (blame shows t

[PATCH] D92596: [FPEnv] Correct constrained metadata in fp16-ops-strict.c

2020-12-03 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: sepavloff, mibintc. kpn added a project: clang. kpn requested review of this revision. Herald added a subscriber: cfe-commits. This test shows we're in some cases not getting strictfp information from the AST. Correct that. Repository: rG LLVM G

[PATCH] D92122: [FPEnv] clang should get from the AST the metadata for constrained FP builtins

2020-11-30 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Thanks for the quick turnaround! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92122/new/ https://reviews.llvm.org/D92122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D92122: [FPEnv] clang should get from the AST the metadata for constrained FP builtins

2020-11-30 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGabfbc5579bd4: [FPEnv] clang should get from the AST the metadata for constrained FP builtins (authored by kpn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D92122: [FPEnv] clang should get from the AST the metadata for constrained FP builtins

2020-11-25 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: sepavloff, mibintc, rjmccall. kpn added a project: clang. Herald added a subscriber: cfe-commits. kpn requested review of this revision. Currently clang is not correctly retrieving from the AST the metadata for constrained FP builtins. This patch fi

[PATCH] D88987: [FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict-floating-point

2020-11-12 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac523d2de51c: [FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict… (authored by kpn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8898

[PATCH] D88987: [FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict-floating-point

2020-11-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 304557. kpn added a comment. Update for review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88987/new/ https://reviews.llvm.org/D88987 Files: clang/include/clang/Driver/Options.td clang/lib/Frontend/CompilerInvocation.cpp Index: clang/

[PATCH] D88987: [FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict-floating-point

2020-11-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. No worries! The option does already have tests that verify correct operation. Comment at: clang/include/clang/Driver/Options.td:1286 + HelpText<"Enables experimental strict floating point in LLVM.">, + MarshallingInfoFlag<"LangOpts->ExpStrictFP", "false"

[PATCH] D90921: [Clang][AArch64] Remove unused prefix in constrained rounding test

2020-11-06 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn accepted this revision. kpn 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/D90921/new/ https://reviews.llvm.org/D90921 ___ cfe-com

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-11-04 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Update for review comments. Comment at: clang/test/CodeGen/builtin_float_strictfp.c:1 +// RUN: %clang_cc1 -emit-llvm -triple x86_64-windows-pc -ffp-exception-behavior=maytrap -o - %s | FileCheck %s --check-prefixes=CHECK,FP16 +// RUN: %clang_cc1 -emit-llv

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-30 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. I'll see how much I can simplify of the tests. Comment at: clang/test/CodeGen/exprs-strictfp.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -ffp-exception-beha

[PATCH] D90316: [FPEnv] Diagnose pragmas FENV_ROUND,_ACCESS and float_control if target does not support StrictFP

2020-10-28 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. I also added "-fexperimental-strict-floating-point" which makes it possible to write tests for a target when bringing up the support on that target. I think it would be confusing for that flag to work on command line arguments but not pragmas. Repository: rG LLVM Github

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-27 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D88913#2353379 , @sepavloff wrote: > Generally the patch looks good. But the need to expect incorrect values in > tests is a concern. Maybe this is a consequence of storing exception behavior > in a separate field of CGFPOptionsRA

[PATCH] D88987: [FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict-floating-point

2020-10-26 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88987/new/ https://reviews.llvm.org/D88987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-23 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics-constrained.c:26 +// metadata from the AST instead of the global default from the command line. +// FIXME: All cases of "fpexcept.maytrap" in this test are wrong. + kpn wrote:

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-23 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:154-155 + OldRounding = CGF.Builder.getDefaultConstrainedRounding(); if (OldFPFeatures == FPFeatures) return; sepavloff wrote: > This check can be lifted to just after the def

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-13 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:618-619 FPOptions OldFPFeatures; +llvm::fp::ExceptionBehavior OldExcept; +llvm::RoundingMode OldRounding; Optional FMFGuard; sepavloff wrote: > Is it possible to merge th

[PATCH] D88913: [FPEnv] Use strictfp metadata in casting nodes

2020-10-08 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:139 + + switch (E->getStmtClass()) { + case Stmt::UnaryOperatorClass: { sepavloff wrote: > Actually this is not correct, because subclass relations are not preserved in > this case. F

[PATCH] D88987: [FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict-floating-point

2020-10-07 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added a reviewer: dang. kpn added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. kpn requested review of this revision. As of D80952 we are disabling strict floating point on all hosts except those that are exp

[PATCH] D85920: [FPEnv][AST] WIP!!! For casts, keep FP options in trailing storage of CastExpr

2020-09-22 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn abandoned this revision. kpn added a comment. Unneeded since D85960 landed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85920/new/ https://reviews.llvm.org/D85920

[PATCH] D69272: Enable '#pragma STDC FENV_ACCESS' in frontend

2020-09-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Say, in D80952 I added support for disabling strictfp support when a target doesn't support it. But it only applies to command line arguments. Is there any chance at all that relevant pragmas can also be disabled with the warning in the sa

[PATCH] D85920: [FPEnv][AST] WIP!!! For casts, keep FP options in trailing storage of CastExpr

2020-08-17 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn planned changes to this revision. kpn added a comment. It would be better to go with D85960 . I'll hedge and keep this open until that one gets pushed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85920/new/ h

[PATCH] D85960: [AST][FPEnv] Keep FP options in trailing storage of CastExpr

2020-08-14 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. You mentioned in D85920 a need to merge this review with that review. I don't think that's needed. This code here is farther along. It does everything that D85920 does and has necessary pieces implemented a

[PATCH] D85920: [FPEnv][AST] WIP!!! For casts, keep FP options in trailing storage of CastExpr

2020-08-13 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: rjmccall, mibintc, shafik, sepavloff. kpn added a project: clang. Herald added subscribers: cfe-commits, jfb, martong. kpn requested review of this revision. This change allows FP options to be in the trailing storage of CastExpr. Needed for proper

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-07-10 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked an inline comment as done. kpn added inline comments. Comment at: clang/include/clang/Driver/Options.td:1246 HelpText<"Enables an experimental new pass manager in LLVM.">; +def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-07-10 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd4ce862f2aa8: Reland "[FPEnv][Clang][Driver] Disable constrained floating point on targets… (authored by kpn). Herald added a reviewer: dang. Changed prior to commit: https://reviews.llvm.org/D80952?vs=

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-07-09 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked 3 inline comments as done. kpn added a comment. Thanks for the reviews and the fast turnaround! I do appreciate it! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80952/new/ https://reviews.llvm.org/D80952 ___ cfe-commits mailing

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-07-07 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 276166. kpn added a comment. Add the -fexperimental-strict-floating-point flag to enable on hosts that are not marked as supporting strict FP yet. Add test and documentation. Update tests to use the new flag. This eliminates the XFAIL lines and should keep the

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-07-07 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG39d2ae0afb23: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking… (authored by kpn). Changed pr

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-07-06 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Already on it. I hope I got it now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80952/new/ https://reviews.llvm.org/D80952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-07-06 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG39d2ae0afb23: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking… (authored by kpn). Changed pr

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-06-30 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Ping. I'm really hoping to get this into 11. Otherwise we're going multiple releases with options that people already use causing crashes on most architectures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80952/new/ https://reviews.llvm.org/D80952 ___

[PATCH] D82020: PowerPC-specific builtin constrained FP enablement

2020-06-25 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG15edd7aaa714: [FPEnv] PowerPC-specific builtin constrained FP enablement (authored by ajwock, committed by kpn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-06-22 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 272530. kpn added a comment. Remove debugging command left in accidentally. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80952/new/ https://reviews.llvm.org/D80952 Files: clang/include/clang/Basic/DiagnosticFrontendKinds.td clang/include/c

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-06-22 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. Herald added a subscriber: wuzish. Ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80952/new/ https://reviews.llvm.org/D80952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[PATCH] D80952: [FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.

2020-06-11 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 270219. kpn retitled this revision from "[FPEnv][Clang][Driver][WIP] Disable constrained floating point on targets lacking support." to "[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support.". kpn added a comment. Herald added a s

[PATCH] D81178: [FPEnv] Initialization of C++ globals not strictfp aware

2020-06-08 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked an inline comment as done. kpn added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:4348 + /// Query for the use of constrained floating point math + bool isStrictFP() { return Builder.getIsFPConstrained(); } + rjmccall wrote: > How

[PATCH] D81178: [FPEnv] Initialization of C++ globals not strictfp aware

2020-06-04 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: rjmccall, pcc, mibintc. Herald added a project: clang. Herald added a subscriber: cfe-commits. The rules of the strictfp attribute say that if it is used inside a function then it must also be in the function definition. Initialization of C++ global

[PATCH] D80952: [FPEnv][Clang][Driver][WIP] Disable constrained floating point on targets lacking support.

2020-06-02 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D80952#2067643 , @arsenm wrote: > In D80952#2067563 , @efriedma wrote: > > > The problem for the command-line arguments in particular is that they > > aren't really new; clang has been eatin

[PATCH] D80952: [FPEnv][Clang][Driver][WIP] Disable constrained floating point on targets lacking support.

2020-06-01 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: cameron.mcinally, craig.topper, andrew.w.kaylor, spatel, wristow, nemanjai. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. kpn added a comment. This currently triggers a failure in test "Clang :: Misc/warning-flags.c

[PATCH] D80952: [FPEnv][Clang][Driver][WIP] Disable constrained floating point on targets lacking support.

2020-06-01 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. This currently triggers a failure in test "Clang :: Misc/warning-flags.c". Suggestions on how to fix that correctly are welcome. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80952/new/ https://reviews.llvm.org/D80952 _

[PATCH] D76949: Replace subtract-from-zero float in version with fneg in PowerPC special fma compiler builtins

2020-04-03 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba87430cadb2: [PowerPC] Replace subtract-from-zero float in version with fneg in PowerPC… (authored by ajwock, committed by kpn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D77074: [FPEnv][AArch64] Platform-specific builtin constrained FP enablement

2020-04-02 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked an inline comment as done. kpn added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8486-8492 + return Builder.CreateConstrainedFPCall( + F, + {EmitScalarExpr(E->getArg(1)), EmitScalarExpr(E->getArg(2)), Ops[0]}); +} else { +

[PATCH] D77074: [FPEnv][AArch64] Platform-specific builtin constrained FP enablement

2020-03-30 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked 3 inline comments as done. kpn added a comment. Note that the AArch64 backend isn't ready for some of these changes. That's why the test is marked XFAIL. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5706 +Function *F; +//exit(2); // XXX +if (Builder.getIs

[PATCH] D73570: [FPEnv][X86] Platform-specific builtin constrained FP enablement

2020-02-06 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG208470dd5d0a: [FPEnv][X86] Platform-specific builtin constrained FP enablement (authored by kpn). Repository: rG LLVM G

[PATCH] D73570: [FPEnv][X86] Platform-specific builtin constrained FP enablement

2020-01-31 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 241771. kpn added a comment. Address review comments: FMA tests are now run optimized. This changes where the FIXME lines are located. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73570/new/ https://reviews.llvm.

[PATCH] D73570: [FPEnv][X86] Platform-specific builtin constrained FP enablement

2020-01-29 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked 2 inline comments as done. kpn added inline comments. Comment at: clang/test/CodeGen/fma-builtins-constrained.c:4 +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-apple-darwin -target-feature +fma -S -o - | FileCheck --check-prefix=COMMON --check-prefix=CHECK-ASM

[PATCH] D73570: [FPEnv][X86] Platform-specific builtin constrained FP enablement

2020-01-28 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added reviewers: craig.topper, andrew.w.kaylor. Herald added a project: clang. Herald added a subscriber: cfe-commits. [FPEnv][X86] Platform-specific builtin constrained FP enablement When constrained floating point is enabled the X86-specific builtins don't use co

[PATCH] D72820: [FPEnv] Add pragma FP_CONTRACT support under strict FP.

2020-01-24 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3381 + "constrained mode"); +FMulAdd = Builder.CreateCall( +CGF.CGM.getIntrinsic(llvm::Intrinsic::experimental_constrained_fmuladd, craig.topper wrote: > kpn wrote: >

[PATCH] D72820: [FPEnv] Add pragma FP_CONTRACT support under strict FP.

2020-01-24 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3381 + "constrained mode"); +FMulAdd = Builder.CreateCall( +CGF.CGM.getIntrinsic(llvm::Intrinsic::experimental_constrained_fmuladd, craig.topper wrote: > Doesn't this

[PATCH] D72722: [FPEnv] [SystemZ] Platform-specific builtin constrained FP enablement

2020-01-21 Thread Kevin P. Neal via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2e667d07c773: [FPEnv][SystemZ] Platform-specific builtin constrained FP enablement (authored by kpn). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72722/new

[PATCH] D72722: [FPEnv] [SystemZ] Platform-specific builtin constrained FP enablement

2020-01-21 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 239325. kpn added a comment. Eliminate a blank line I thought I had already had gotten. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72722/new/ https://reviews.llvm.org/D72722 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/builtins-syst

[PATCH] D72722: [FPEnv] [SystemZ] Platform-specific builtin constrained FP enablement

2020-01-21 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 239324. kpn added a comment. Update for review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72722/new/ https://reviews.llvm.org/D72722 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/builtins-systemz-vector-constrained.c clan

[PATCH] D72722: [FPEnv] [SystemZ] Platform-specific builtin constrained FP enablement

2020-01-21 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn marked an inline comment as done. kpn added inline comments. Comment at: clang/test/CodeGen/builtins-systemz-vector2-constrained.c:25 + // CHECK: [[NEG:%[^ ]+]] = fneg <2 x double> {{.*}} + // CHECK: [[RES:%[^ ]+]] = call <2 x double> @llvm.experimental.constrained.fma.v2

[PATCH] D72722: [FPEnv] [SystemZ] Platform-specific builtin constrained FP enablement

2020-01-14 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added a reviewer: uweigand. Herald added a project: clang. Herald added a subscriber: cfe-commits. When constrained floating point is enabled the SystemZ-specific builtins don't use constrained intrinsics in some cases. Fix that. Repository: rG LLVM Github Monor

[PATCH] D71854: [SystemZ] Use FNeg in s390x clang builtins

2020-01-02 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn closed this revision. kpn added a comment. My pleasure! Closed with commit 89d6c288ba5adb20d92142e9425f7ab79b8f159e . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71854/new/ https://reviews.llvm.org/D71854 __

[PATCH] D71854: [SystemZ] Use FNeg in s390x clang builtins

2020-01-02 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn updated this revision to Diff 235880. kpn added a comment. Update now-failing tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71854/new/ https://reviews.llvm.org/D71854 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/builtins-systemz-vector.c clang/test/CodeGen

  1   2   >