<commit_before>/* This file is part of Metallic, a runtime library for WebAssembly.
 *
 * Copyright (C) 2018 <NAME> <<EMAIL>>
 *
 * This Source Code Form is subject to the terms of the Mozilla
 * Public License v. 2.0. If a copy of the MPL was not distributed
 * with this file, You can obtain one at http://mozilla.org/MPL/2.0/
 */
#include "../assert.h"

static void run(__int128 x)
{
    __int128 y = x;

    for (int shift = 0; shift < 128; ++shift) {
        metallic_assert(x << shift == y);
        y <<= 1;
    }
}

int main(void)
{
    for (unsigned __int128 x = 1; !(x >> 127); x *= 2)
        run(x);

    for (unsigned __int128 x = 1; !(x >> 127); x *= 3)
        run(x);

    for (unsigned __int128 x = 1; !(x >> 127); x *= 5)
        run(x);

    for (unsigned __int128 x = 1; !(x >> 127); x *= 7)
        run(x);

    for (unsigned __int128 x = 1; !(x >> 127); x += 0x70724BBC5F03E06C + (x >> 3))
        run(x);
}
<commit_msg>Left shift is sign agnostic<commit_after>/* This file is part of Metallic, a runtime library for WebAssembly.
 *
 * Copyright (C) 2018 <NAME> <<EMAIL>>
 *
 * This Source Code Form is subject to the terms of the Mozilla
 * Public License v. 2.0. If a copy of the MPL was not distributed
 * with this file, You can obtain one at http://mozilla.org/MPL/2.0/
 */
#include "../assert.h"

static void run(unsigned __int128 x)
{
    unsigned __int128 y = x;

    for (int shift = 0; shift < 128; ++shift) {
        metallic_assert(x << shift == y);
        y <<= 1;
    }
}

int main(void)
{
    for (unsigned __int128 x = 1; x; x *= 2)
        run(x);

    for (unsigned __int128 x = 1; x >> 104 != 0x313370; x *= 3)
        run(x);
}

{'fraction_non_alphanumeric': 0.14961101137043686, 'fraction_numerical': 0.06523040095751047, 'mean_word_length': 2.433264887063655, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2940048', 'n_tokens_mistral': 684, 'n_tokens_neox': 587, 'n_words': 226}