diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 9480ed6f09..db3b33abc5 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -2011,7 +2011,10 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) { Result = DAG.getNode(ISD::UNDEF, NVT); break; case ISD::Constant: - Result = DAG.getNode(ISD::SIGN_EXTEND, NVT, Op); + if (VT != MVT::i1) + Result = DAG.getNode(ISD::SIGN_EXTEND, NVT, Op); + else + Result = DAG.getNode(ISD::ZERO_EXTEND, NVT, Op); assert(isa<ConstantSDNode>(Result) && "Didn't constant fold zext?"); break; case ISD::ConstantFP: |