<commit_before>#include <Halide.h>
#include <stdio.h>

using namespace Halide;

int main(int argc, char **argv) {
    Func f, g;
    Var x;
    Param<void *> handle;

    f(x) = reinterpret<uint64_t>(handle);
    g(x) = reinterpret<uint64_t>(handle);

    int foo;
    handle.set(&foo);

    Image<uint64_t> out1 = f.realize(4);

    g.vectorize(x, 4);
    Image<uint64_t> out2 = g.realize(4);

    uint64_t correct = (uint64_t)(&foo);

    for (int x = 0; x < out1.width(); x++) {
        if (out1(x) != correct) {
            printf("out1(%d) = %llu instead of %llu\n",
                   x,
                   (long long unsigned)out1(x),
                   (long long unsigned)correct);<commit_msg>Casting a 32-bit pointer to a uint64_t sign-extends!<commit_after>#include <Halide.h>
#include <stdio.h>

using namespace Halide;

int main(int argc, char **argv) {
    Func f, g;
    Var x;
    Param<void *> handle;

    f(x) = reinterpret<uint64_t>(handle);
    g(x) = reinterpret<uint64_t>(handle);

    int foo;

    handle.set(&foo);

    Image<uint64_t> out1 = f.realize(4);

    g.vectorize(x, 4);
    Image<uint64_t> out2 = g.realize(4);

    uint64_t correct = (uint64_t)((uintptr_t)(&foo));

    for (int x = 0; x < out1.width(); x++) {
        if (out1(x) != correct) {
            printf("out1(%d) = %llu instead of %llu\n",
                   x,
                   (long long unsigned)out1(x),
                   (long long unsigned)correct);
{'fraction_non_alphanumeric': 0.15991763898421413, 'fraction_numerical': 0.032944406314344546, 'mean_word_length': 2.3517241379310345, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, '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': '2625883', 'n_tokens_mistral': 577, 'n_tokens_neox': 535, 'n_words': 124}