diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-12-28 13:08:20 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-12-28 13:08:20 +0000 |
commit | 3c3dd6e588ef6ad9de4777f5272069648c1e4149 (patch) | |
tree | dda852b292f1ce610d9511f6cd43ba18adcecba8 /llvm/lib/CodeGen | |
parent | b3515a8d4bf863560bf96044c24a2058d70e58db (diff) | |
download | bcm5719-llvm-3c3dd6e588ef6ad9de4777f5272069648c1e4149.tar.gz bcm5719-llvm-3c3dd6e588ef6ad9de4777f5272069648c1e4149.zip |
PR11662.
Promotion of the mask operand needs to be done using PromoteTargetBoolean, and not padded with garbage.
llvm-svn: 147309
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp index 26be0b74c8e..b16c4ce6e0f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp @@ -489,7 +489,11 @@ SDValue DAGTypeLegalizer::PromoteIntRes_SELECT(SDNode *N) { } SDValue DAGTypeLegalizer::PromoteIntRes_VSELECT(SDNode *N) { - SDValue Mask = GetPromotedInteger(N->getOperand(0)); + SDValue Mask = N->getOperand(0); + EVT OpTy = N->getOperand(1).getValueType(); + + // Promote all the way up to the canonical SetCC type. + Mask = PromoteTargetBoolean(Mask, TLI.getSetCCResultType(OpTy)); SDValue LHS = GetPromotedInteger(N->getOperand(1)); SDValue RHS = GetPromotedInteger(N->getOperand(2)); return DAG.getNode(ISD::VSELECT, N->getDebugLoc(), |