[PATCH] D26802: [X86][AVX512] Detect repeated constant patterns in BUILD_VECTOR suitable for broadcasting.

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 00:57:19 PST 2016


aymanmus marked 4 inline comments as done.
aymanmus added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:6413-6414
+          // Load the constant and broadcast it.
+          // AVX have support for 32 and 64 bit broadcast for floats only.
+          // No 64bit integer in 32bit subtarget.
+          MVT CVT = MVT::getFloatingPointVT(SplatBitSize);
----------------
spatel wrote:
> I'd hoist these last 2 lines of the comment above to where you check if Subtarget.hasAVX().
This comment explains the specific "else block" it is contained in (explains why we use floats instead of integers in these specific cases).


https://reviews.llvm.org/D26802





More information about the llvm-commits mailing list