drh / lcc

The lcc retargetable ANSI C compiler
https://drh.github.io/lcc/
2.03k stars 442 forks source link

MUL+I / MUL+U simplification fixes. #21

Open ksherlock opened 9 years ago

ksherlock commented 9 years ago
  1. fold constants before commuting or checking for shifts
  2. optimize x * 0 => 0
  3. identity check didn't work since constant is in l tree, not in r tree.