[PATCH] D18676: [x86] avoid intermediate splat for non-zero memsets (PR27100)
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 1 04:50:52 PDT 2016
andreadb added a comment.
Nice patch Sanjay.
================
Comment at: test/CodeGen/X86/memset-nonzero.ll:94
@@ +93,3 @@
+; AVX-LABEL: memset_128_nonzero_bytes:
+; AVX: vmovaps {{.*#+}} ymm0 = [42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42]
+; AVX-NEXT: vmovups %ymm0, 96(%rdi)
----------------
I noticed that on AVX we now always generate a vmovaps to load a vector of constants.
That's obviously fine. However, I wonder if a vbroadcastss would be more appropriate in this case as it would use a smaller constant (for code size only - in this example we would save 28 bytes).
http://reviews.llvm.org/D18676
More information about the llvm-commits
mailing list