>>13The C operators represent what all instruction sets are expected to have in common. The whole *point* of C is portability, and your code wouldn't be portable if it depends on instructions specific to a given architecture.
Why does C have multiply? Some CPUs don't have that. C should make you write a loop with addition and have magic code that turns your loop into multiplication. Why does C have bit shifts? Why not make you calculate that
x<<3
means
x*8
and then multiply or divide (using a loop)?
C shouldn't have floating point either because a lot of CPUs don't support it. C compilers should have magic reverse-engineering technology that turns software floating point algorithms into floating point instructions.
>>17The way a C compiler does instruction selection is by attempting to tile the AST with prepared the instructions it knows matches AST patterns.
That's how C compilers do it now. C compilers used to be dumb. Most of these new optimizations only exist because they can't be written in C directly.