> Which is this from the mail archives: > > https://gcc.gnu.org/pipermail/gcc-patches/1998-June/000308.html > > I would tend to agree that for equal cost that the constant would be > preferred since that should be better from a scheduling/dependency > standpoint. So it seems to me we can drive this purely from a costing > standpoint.
I did bootstrapping and ran the testsuite on x86(-64), aarch64, Power9 and s390. Everything looks good except two additional fails on x86 where code actually looks worse. gcc.target/i386/keylocker-encodekey128.c 17c17,18 < movaps %xmm4, k2(%rip) --- > pxor %xmm0, %xmm0 > movaps %xmm0, k2(%rip) gcc.target/i386/keylocker-encodekey256.c: 19c19,20 < movaps %xmm4, k3(%rip) --- > pxor %xmm0, %xmm0 > movaps %xmm0, k3(%rip) Regards Robin