This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Using shifts by 1 on K6,K7 and i386
- To: <gcc at gcc dot gnu dot org>
- Subject: Using shifts by 1 on K6,K7 and i386
- From: "Martin Erhardsen" <MartinErhardsen at mail dot tele dot dk>
- Date: Sat, 1 Jul 2000 11:30:56 +0200
Why doesn't gcc use logical shifts, arithmetric shifts and rotates by 1
instead of immediate operands on the K6,K7 and i386.
It saves a byte and has the same latency (except on i486,
where it uses an extra cycle). I have measured this on
my K6-2 and looked it up for K7 and i386
I propose that the current predicate for using shifts
and rotates by 1
(TARGET_PENTIUM || TARGET_PENTIUMPRO)
be replaced by this
(!TARGET_I486 || optimize_size)