[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-26 Thread Anton Korobeynikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa4e8f7fe3f38: [builtins] Improve compatibility with 16 bit targets (authored by atrosinenko, committed by asl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

Re: [PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-23 Thread Mikhail Goncharov via cfe-commits
Yes, that seems to be strange that 'compiler-rt' was dropped. Will check why. On Tue, Jun 23, 2020 at 10:32 AM Anatoly Trosinenko via Phabricator < revi...@reviews.llvm.org> wrote: > atrosinenko added a comment. > > > could you please clarify what exactly is wrong? Windows not building > 'compile

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-23 Thread Mikhail Goncharov via Phabricator via cfe-commits
goncharov added a comment. In D81408#2105188 , @atrosinenko wrote: > @goncharov > > Meanwhile, looking at the latest Buildkite build > for this > review, we have: > > name=artifacts/CMakeCac

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-23 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. > could you please clarify what exactly is wrong? Windows not building > 'compiler-rt'? Yes. Maybe I misunderstood the intention. It just looked quite strange to me that when only the `compiler-rt/` subtree of the repository was changed, pre-merge check was optimiz

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-22 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM We don't need to block this on the pre-merge checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81408/new/ https://reviews.llvm.org

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-20 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a subscriber: goncharov. atrosinenko added a comment. In D81408#2104572 , @efriedma wrote: > > Those flaky test failures seems to be due to ld.lld being not built from > > source as part of testing compiler-rt/-only patches. > > That sho

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Those flaky test failures seems to be due to ld.lld being not built from > source as part of testing compiler-rt/-only patches. That should be something we can fix in the build system. compiler-rt/test/CMakeLists.txt has a list of executables which the tests depend

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-19 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Those flaky test failures seems to be due to `ld.lld` being not built from source as part of testing `compiler-rt/`-only patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81408/new/ https://reviews.llvm.org

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-18 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko updated this revision to Diff 271671. atrosinenko added a comment. Rebase onto working upstream commit to (hopefully) make tests pass for my patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81408/new/ https://reviews.llvm.org/D81408

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-09 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Our out-of-tree target also have 16 bit ints and we've had to change a whole bunch of __builtin_clz to clzsi and __builtin_ctz to ctzsi to make things work so this patch is a step in the right direction for us too. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-09 Thread Ayke via Phabricator via cfe-commits
aykevl added a comment. I tested this patch against my local testing system to make sure it didn't break anything, and I get the same number of failures (most of which are due to a missing complex.h file, which is unrelated). So it looks fine from my point of view, although I know not enough ab

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/fp_lib.h:49 -static __inline int rep_clz(rep_t a) { return __builtin_clz(a); } +static __inline int rep_clz(rep_t a) { return clzsi(a); } efriedma wrote: > MaskRay wrote: > > atrosinenko

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: compiler-rt/lib/builtins/fp_lib.h:49 -static __inline int rep_clz(rep_t a) { return __builtin_clz(a); } +static __inline int rep_clz(rep_t a) { return clzsi(a); } MaskRay wrote: > atrosinenko wrote: > > MaskRay wrot

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/builtins/fp_lib.h:49 -static __inline int rep_clz(rep_t a) { return __builtin_clz(a); } +static __inline int rep_clz(rep_t a) { return clzsi(a); } atrosinenko wrote: > MaskRay wrote: > > Why is this n

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-08 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added inline comments. Comment at: compiler-rt/lib/builtins/fp_lib.h:49 -static __inline int rep_clz(rep_t a) { return __builtin_clz(a); } +static __inline int rep_clz(rep_t a) { return clzsi(a); } MaskRay wrote: > Why is this needed? First of all

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: compiler-rt/lib/builtins/fp_lib.h:49 -static __inline int rep_clz(rep_t a) { return __builtin_clz(a); } +static __inline int rep_clz(rep_t a) { return clzsi(a); } Why is this needed? Repository: rG LLVM Github Mo

[PATCH] D81408: [builtins] Improve compatibility with 16 bit targets

2020-06-08 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko created this revision. atrosinenko added reviewers: aykevl, MaskRay, efriedma, uabelho, howard.hinnant. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. Some parts of existing codebase assume the default `int` type to be (at least) 32 bit wide. On 16 bit targ