peepopt: Add assert of consistent `shiftadd` data

This commit is contained in:
phsauter 2023-11-06 16:35:00 +01:00
parent c3b8de54da
commit 3618294bac
1 changed files with 5 additions and 4 deletions

View File

@ -85,10 +85,11 @@ endmatch
code
{
if (offset>0 && var_signed) {
log("I should not be here %x\n", var_signed);
reject;
}
// positive constant offset with a signed variable (index) cannot be handled
// the above filter should get rid of this case but 'offset' is calculated differently
// due to limitations of state-variables in pmgen
// it should only differ if previous passes create invalid data
log_assert(!(offset>0 && var_signed));
did_something = true;
log("shiftadd pattern in %s: shift=%s, add/sub=%s, offset: %d\n", \