Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another missed case of StrengthReduction #2343

Closed
fruffy opened this issue Apr 27, 2020 · 0 comments · Fixed by #2347
Closed

Another missed case of StrengthReduction #2343

fruffy opened this issue Apr 27, 2020 · 0 comments · Fixed by #2347
Assignees
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@fruffy
Copy link
Collaborator

fruffy commented Apr 27, 2020

Here is another case where StrengthReduction erroneously removes a function call. This time, it concerns the return value of a function call, which is shifted and sliced.

control ingress(inout Headers h, inout Meta m, inout standard_metadata_t sm) {
    apply {
        h.eth_hdr.eth_type = (do_function(h.eth_hdr.dst_addr) << 8w15)[15:0];
    }
}

strength_reduction_another_case.stf.txt
strength_reduction_another_case.p4.txt

@mihaibudiu mihaibudiu added the bug This behavior is unintended and should be fixed. label Apr 28, 2020
@mihaibudiu mihaibudiu self-assigned this Apr 28, 2020
@mihaibudiu mihaibudiu added the fixed This topic is considered to be fixed. label Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants