[PATCH] D28744: [X86][AVX] Remove "OptForSize" condition from some memory foldings.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 21:09:33 PST 2017


craig.topper added a comment.

I'm not sure I believe the OptForSize was naively copied from SSE. Someone went to the trouble of using AVX instructions with the correct number of operands in this comment block that your patch removes. It demonstrates exactly the issue I was pointing out.

  // We don't want to fold scalar loads into these instructions unless
  // optimizing for size. This is because the folded instruction will have a
  // partial register update, while the unfolded sequence will not, e.g.
  // vmovss mem, %xmm0
  // vrcpss %xmm0, %xmm0, %xmm0
  // which has a clobber before the rcp, vs.
  // vrcpss mem, %xmm0, %xmm0
  // TODO: In theory, we could fold the load, and avoid the stall caused by
  // the partial register store, either in ExeDepFix or with smarter RA.


https://reviews.llvm.org/D28744





More information about the llvm-commits mailing list