summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-07-08 14:40:04 +0000
committerHal Finkel <hfinkel@anl.gov>2013-07-08 14:40:04 +0000
commit12493bb7d584afa01a64659d300b10c4dfdb0755 (patch)
tree32ca89987e76d3fda67408b78f8059b256394a3f /llvm/lib/CodeGen
parent3ac9b9e258cfd7134fa5243c570aad7804c39ba8 (diff)
downloadbcm5719-llvm-12493bb7d584afa01a64659d300b10c4dfdb0755.tar.gz
bcm5719-llvm-12493bb7d584afa01a64659d300b10c4dfdb0755.zip
Improve the comment from r185794 (re: PromoteIntRes_BUILD_VECTOR)
In response to Duncan's review, I believe that the original comment was not as clear as it could be. Hopefully, this is better. llvm-svn: 185824
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index df388981aed..76c028d078e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -2931,8 +2931,10 @@ SDValue DAGTypeLegalizer::PromoteIntRes_BUILD_VECTOR(SDNode *N) {
Ops.reserve(NumElems);
for (unsigned i = 0; i != NumElems; ++i) {
SDValue Op;
- // It is possible for the operands to be larger than the result, for example,
- // when the operands are promoted booleans and the result was an i1 vector.
+ // BUILD_VECTOR integer operand types are allowed to be larger than the
+ // result's element type. This may still be true after the promotion. For
+ // example, we might be promoting (<v?i1> = BV <i32>, <i32>, ...) to
+ // (v?i16 = BV <i32>, <i32>, ...), and we can't any_extend <i32> to <i16>.
if (N->getOperand(i).getValueType().bitsLT(NOutVTElem))
Op = DAG.getNode(ISD::ANY_EXTEND, dl, NOutVTElem, N->getOperand(i));
else
OpenPOWER on IntegriCloud