aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-crc-optimization.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple-crc-optimization.cc')
-rw-r--r--gcc/gimple-crc-optimization.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/gimple-crc-optimization.cc b/gcc/gimple-crc-optimization.cc
index dd1595a..12868ac 100644
--- a/gcc/gimple-crc-optimization.cc
+++ b/gcc/gimple-crc-optimization.cc
@@ -957,7 +957,22 @@ crc_optimization::execute (function *fun)
state::print_bits (lfsr);
}
}
- /* TODO: Match LFSR. */
+
+ if (symb_exec.states_match_lfsr (lfsr))
+ {
+ if (dump_file)
+ {
+ fprintf (dump_file, "The function really calculates CRC "
+ "and returns it!\n");
+ }
+ }
+ else
+ {
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "Returned state and LFSR differ.\n");
+ }
+ }
}
return 0;
}