[llvm] r230278 - Fix based on post-commit comment on D7816 & rL230177 - BUILD_VECTOR operand truncation was using the the BV's output scalar type instead of the input type.
Simon Pilgrim
llvm-dev at redking.me.uk
Mon Feb 23 15:04:29 PST 2015
Author: rksimon
Date: Mon Feb 23 17:04:28 2015
New Revision: 230278
URL: http://llvm.org/viewvc/llvm-project?rev=230278&view=rev
Log:
Fix based on post-commit comment on D7816 & rL230177 - BUILD_VECTOR operand truncation was using the the BV's output scalar type instead of the input type.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=230278&r1=230277&r2=230278&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Mon Feb 23 17:04:28 2015
@@ -11447,10 +11447,11 @@ SDValue DAGCombiner::visitCONCAT_VECTORS
if (!SVT.isFloatingPoint())
// If BUILD_VECTOR are from built from integer, they may have different
// operand types. Get the smaller type and truncate all operands to it.
- for (const SDValue &Op : N->ops()) {
- EVT OpSVT = Op.getValueType().getScalarType();
- MinVT = MinVT.bitsLE(OpSVT) ? MinVT : OpSVT;
- }
+ for (const SDValue &Op : N->ops())
+ if (ISD::BUILD_VECTOR == Op.getOpcode()) {
+ EVT OpSVT = Op.getOperand(0)->getValueType(0);
+ MinVT = MinVT.bitsLE(OpSVT) ? MinVT : OpSVT;
+ }
for (const SDValue &Op : N->ops()) {
EVT OpVT = Op.getValueType();
More information about the llvm-commits
mailing list