[llvm-commits] [llvm] r72957 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/dagcombine-buildvector.ll

Duncan Sands baldrick at free.fr
Sun Jun 7 12:39:30 PDT 2009


Hi Nate,

> Adapt the x86 build_vector dagcombine to the current state of the legalizer.
> build vectors with i64 elements will only appear on 32b x86 before legalize.
> Since vector widening occurs during legalize, and produces i64 build_vector 
> elements, the dag combiner is never run on these before legalize splits them
> into 32b elements.

BUILD_VECTOR is allowed to have an element type bigger than the
component type:

     /// BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a vector with the
     /// specified, possibly variable, elements.  The number of elements is
     /// required to be a power of two.  The types of the operands must 
all be
     /// the same and must match the vector element type, except that 
integer
     /// types are allowed to be larger than the element type, in which case
     /// the operands are implicitly truncated.
     BUILD_VECTOR,

So as long as the vector you are building is a vector of i32 the use
of i64 as BUILD_VECTOR operands is supposed to be ok.  But maybe the
situation here is different?

Ciao,

Duncan.



More information about the llvm-commits mailing list