[llvm-commits] [llvm] r139995 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/trunc-ext-ld-st.ll
Eli Friedman
eli.friedman at gmail.com
Mon Sep 19 11:38:17 PDT 2011
On Sun, Sep 18, 2011 at 3:39 AM, Nadav Rotem <nadav.rotem at intel.com> wrote:
> + // Attempt to load the original value using a single load op.
> + // Find a scalar type which is equal to the loaded word size.
> + MVT SclrLoadTy = MVT::i8;
> + for (unsigned tp = MVT::FIRST_INTEGER_VALUETYPE;
> + tp < MVT::LAST_INTEGER_VALUETYPE; ++tp) {
> + MVT Tp = (MVT::SimpleValueType)tp;
> + if (TLI.isTypeLegal(Tp) && Tp.getSizeInBits() == MemSz) {
> + SclrLoadTy = Tp;
> + break;
> + }
> + }
> +
> + // Proceed if a load word is found.
> + if (SclrLoadTy.getSizeInBits() != MemSz) return SDValue();
This approach to finding a load misses one somewhat important case:
the 64-bit case on x86-32 and ARM. Do you have any ideas here?
> @@ -13479,9 +13563,7 @@
>
> // From, To sizes and ElemCount must be pow of two
> if (!isPowerOf2_32(NumElems * FromSz * ToSz)) return SDValue();
> - // We are going to use the original vector elt for storing.
> - // accumulated smaller vector elements must be a multiple of bigger size.
> - if (0 != (NumElems * ToSz) % FromSz) return SDValue();
> +
What is this change supposed to do?
-Eli
More information about the llvm-commits
mailing list