p4c
p4c copied to clipboard
DPDK backend can generate incorrect intermediate programs
The culprit is the function ConvertBinaryOperationTo2Params::postorder(IR::AssignmentStatement *a)
The bug is in handling comparison operations. These consume integers, but produce booleans.
The expansion in this function ignores the type and reuses the same temporary variable.
Unfortunately I don't have yet a small reproduction, since this happened while fixing other bugs in the compiler.
In fact there are several programs marked as xfail for the dpdk backend with the error "AssignmentStatement", so I suspect these trigger the same bug.
@usha1830 @mbudiu-vmw Is this still a bug in the DPDK back end today?
I presume this is fixed.
We don't have any tests failing with the "AssignmentStatement" error.
I also see the function ConvertBinaryOperationTo2Params::postorder(IR::AssignmentStatement *a)
does not handle Relational operations
https://github.com/p4lang/p4c/blob/main/backends/dpdk/dpdkArch.cpp#L1037
Can we close this issue?