[PATCH] D86299: [compiler-rt][builtins] Factor out some common bit manipulations

2020-08-24 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/int_mulo_impl.inc:22 +// themselves indefinitely when compiled with UBSan. +#if defined(__clang__) +#define NO_UBSAN __attribute__((no_sanitize("undefined"))) MaskRay wrote: > AFAIK LLVM_USE_

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb9f49d13fd44: [compiler-rt][builtins] Add more test cases for __div[sdt]f3 LibCalls (authored by atrosinenko). Changed prior to commit: https://reviews.llvm.org/D84932?vs=286523&id=287650#toc Repositor

[PATCH] D84932: [builtins] Add more test cases for __div[sdt]f3 LibCalls

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Uploaded, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84932/new/ https://reviews.llvm.org/D84932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: efriedma, MaskRay, aykevl, uabelho. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. Use s[iu]_int instead of `(unsigned) int` and d[ui]_int instead of `

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: efriedma, MaskRay, aykevl, uabelho. Herald added subscribers: Sanitizers, dberris. Herald added a project: Sanitizers. atrosinenko requested review of this revision. `__builtin_c[tl]z` accepts `unsigned int` argument that is not alway

[PATCH] D86221: [compiler-rt][builtins] Do not assume int to be at least 32 bit wide

2020-08-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko abandoned this revision. atrosinenko added a comment. Replaced this by D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls and D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

[PATCH] D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko 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 rGfce035eae980: [NFC][compiler-rt] Factor out __mulo[sdt]i4 implementations to .inc file (authored by atrosinenko). Changed prior to commit: https:/

[PATCH] D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko 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 rG182d14db07f1: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file (authored by atrosinenko). Repository: rG LLVM Github Monor

[PATCH] D86289: [NFC][compiler-rt] Factor out __mulo[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Uploaded because it was already approved and no other review comments received since then. Anyway, please feel free to request followup changes if needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86289/new/ https:

[PATCH] D86277: [NFC][compiler-rt] Factor out __mulv[sdt]i3 implementations to .inc file

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Uploaded because it was already approved and no other review comments received since then. Anyway, please feel free to request followup changes if needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86277/new/ https:

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288305. atrosinenko added a comment. - Rebase onto current master branch - Add a dummy `switch` case with `FIXME`, as suggested by @aaron.ballman - Applied a couple of style fixes proposed by linter Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D84602: [MSP430] Expose msp430_builtin calling convention to C code

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Pinging @echristo in case there is some trivial way to allocate a calling convention ID (but probably there is not, unless GCC allocated one already). As I understand, without this ID the debugger may show some misleading output for a limited number of LibCalls. On

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288349. atrosinenko added a comment. No-change re-upload: rebase onto current master branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compiler-rt/li

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288348. atrosinenko added a comment. No-change re-upload: rebase onto current master branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/li

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-27 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/fp_div_impl.inc:142 + // An error due to truncated C + an error due to truncated x_UQ0_hw: + // e_0 <= 3/4 - 1/sqrt(2) + 2^-W0 + 2^-HW + sepavloff wrote: > Should the right part contain `1/

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288599. atrosinenko added a comment. This update is expected to be completely NFC w.r.t. code behavior and significantly clarify the proof up to the end of half-width iterations. Particularly, the reasoning about possible overflow of intermediate results

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288623. atrosinenko added a comment. Add some other explanations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/divdf3.c compi

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-28 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288625. atrosinenko added a comment. Re-upload after changing parent diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compiler-rt/lib/builtins/fp_div_

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288850. atrosinenko added a comment. Herald added a subscriber: danielkiss. Add more clarifications, fix explanation for "why it is enough to adjust only once in case of overflow". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-30 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288851. atrosinenko added a comment. Herald added a subscriber: danielkiss. Re-upload after amending parent diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Fi

[PATCH] D86400: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations

2020-08-30 Thread Anatoly Trosinenko 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 rG11cf6346fd49: [NFC][compiler-rt] Factor out __div[sdt]i3 and __mod[dt]i3 implementations (authored by atrosinenko). Repository: rG LLVM Github Mon

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288932. atrosinenko added a comment. Clarify rounding-related part of function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/di

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 288935. atrosinenko added a comment. Re-upload after amending parent diff + add minor clarification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85032/new/ https://reviews.llvm.org/D85032 Files: compil

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 289022. atrosinenko added a comment. Update after the latest comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85031/new/ https://reviews.llvm.org/D85031 Files: compiler-rt/lib/builtins/divdf3.c

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-08-31 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Thank you very much for review! I have amended this diff based on the latest comment by @scanon. So, I will land D85031 and then D85032: [builtins] Make divXf3 handle denormal results if there are

[PATCH] D85031: [builtins] Unify the softfloat division implementation

2020-09-01 Thread Anatoly Trosinenko 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 rG0e90d8d4fed8: [builtins] Unify the softfloat division implementation (authored by atrosinenko). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D85032: [builtins] Make divXf3 handle denormal results

2020-09-01 Thread Anatoly Trosinenko 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 rG93eed63d2f31: [builtins] Make __div[sdt]f3 handle denormal results (authored by atrosinenko). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2020-09-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86546/new/ https://reviews.llvm.org/D86546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2020-09-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86547/new/ https://reviews.llvm.org/D86547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-09-29 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 557488. atrosinenko added a comment. Updated the patch: - added FPAC to `Extensions` array in AArch64TargetParser.h, so it can be used in `-march=...+fpac` command line option. Adding one more feature seems mostly harmless after PR 65423

[PATCH] D85917: [MSP430] Fix passing C structs and unions as function arguments

2023-07-25 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Sorry for a hung patch. After getting the approval I had doubts that I interpret the corner cases of LLVM IR correctly. Thus, I postponed the patch these days to not subtly break the stable targets while fixing one issue on MSP430. I can re-evaluate this patch if i

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-08-14 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko planned changes to this revision. atrosinenko added a comment. Looks like adding FeatureFPAC may require changes in more places - need to investigate whether I have to add something like AEK_FPAC constant, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-10-11 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. As discussed in D156716 , it is not clear if I have to add FeatureFPAC to every relevant CPU. Maybe it is worth conservatively assuming that this feature should only be enabled manually by the user as a precaution against "I have CP

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-08-01 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: ab, kristof.beyls, apazos, pcc, psmith, t.p.northover. Herald added a subscriber: hiraditya. Herald added a project: All. atrosinenko requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llv

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2022-01-30 Thread Anatoly Trosinenko 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 rG9595f0051000: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls (authored by atrosinenko). Repository: rG LLVM Github Monore

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2022-01-30 Thread Anatoly Trosinenko 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 rG4bcd2588a986: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z (authored by atrosinenko). Repository: rG LLVM Github Monorep

<    1   2