Skip to content

Mis compile with merged ops  #12

@MirceaNT

Description

@MirceaNT

struct output_t{
        int a; int b;
};

typedef struct
{
    int value1 : 13;
    int value2 : 13;
} elements_input_t;

#pragma primate blue thirteenbitadd thirteenbitadd 1 1
int processthirteenbitadd(elements_input_t test)
{
    return (test.value1 + test.value2) & ((1 << 13) - 1);
}

void primate_main()
{
    elements_input_t experiment = PRIMATE::input<elements_input_t>();
    int result = processthirteenbitadd(experiment);
    PRIMATE::output<output_t>({result, 0});

}```

This mis-compiles due to the packet legalizer not knowing how to create extracts for merged operations. Specifically `PseudoADDwss` mis-compiles. 

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcompiler

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions