[llvm-commits] [llvm] r89521 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp test/CodeGen/PowerPC/vec_buildvector_loadstore.ll

Duncan Sands baldrick at free.fr
Fri Nov 20 23:56:01 PST 2009


Hi Dale,

> +    // If EltVT smaller than OpVT, only store the bits necessary.
> +    if (EltVT.bitsLT(OpVT))
> +      Stores.push_back(DAG.getTruncStore(DAG.getEntryNode(), dl,
> +                          Node->getOperand(i), Idx, SV, Offset, EltVT));
> +    else
> +      Stores.push_back(DAG.getStore(DAG.getEntryNode(), dl, 
> +                                    Node->getOperand(i), Idx, SV, Offset));

there is no need for the test, you can always use getTruncStore.  If the store
is not actually truncating it is automagically turned into an ordinary store.

Ciao,

Duncan.



More information about the llvm-commits mailing list