diff options
author | Bob Wilson <bob.wilson@apple.com> | 2009-04-13 22:05:19 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2009-04-13 22:05:19 +0000 |
commit | 59dbbb2bb4ef49b4995c1535a75c0aea5512384e (patch) | |
tree | be485c3d52c8467ee62317acee99054b3ab084f0 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 20bb5e02a51706dab1cd260f8970aee341115ad6 (diff) | |
download | bcm5719-llvm-59dbbb2bb4ef49b4995c1535a75c0aea5512384e.tar.gz bcm5719-llvm-59dbbb2bb4ef49b4995c1535a75c0aea5512384e.zip |
Change SelectionDAG type legalization to allow BUILD_VECTOR operands to be
promoted to legal types without changing the type of the vector. This is
following a suggestion from Duncan
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/019923.html).
The transformation that used to be done during type legalization is now
postponed to DAG legalization. This allows the BUILD_VECTORs to be optimized
and potentially handled specially by target-specific code.
It turns out that this is also consistent with an optimization done by the
DAG combiner: a BUILD_VECTOR and INSERT_VECTOR_ELT may be combined by
replacing one of the BUILD_VECTOR operands with the newly inserted element;
but INSERT_VECTOR_ELT allows its scalar operand to be larger than the
element type, with any extra high bits being implicitly truncated. The
result is a BUILD_VECTOR where one of the operands has a type larger the
the vector element type.
Any code that operates on BUILD_VECTORs may now need to be aware of the
potential type discrepancy between the vector element type and the
BUILD_VECTOR operands. This patch updates all of the places that I could
find to handle that case.
llvm-svn: 68996
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions