[PATCH] D15310: [X86][AVX] Fold loads + splats into broadcast instructions
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 08:46:02 PST 2015
spatel added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:8109
@@ -8107,1 +8108,3 @@
return SDValue();
+ } else if (MayFoldLoad(V)) {
+ // If we are broadcasting a load that is only used by the shuffle
----------------
I don't know if this is even possible in practice: do we need to guard against volatile loads since the transform is shrinking the size of the load?
MayFoldLoad() calls isNormalLoad(), but neither of those check volatility, so if this fires on a volatile load, it looks like we get the original load and a splat load:
vmovaps (%rdi), %ymm0
vbroadcastsd 16(%rdi), %ymm0
Repository:
rL LLVM
http://reviews.llvm.org/D15310
More information about the llvm-commits
mailing list