mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-08 18:31:23 +00:00
Fix a miscompile of PtrDist/bc. Sign extending bools is not the right thing,
at least tends to expose problems elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23149 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5ffcd9b56c
commit
ec176e30d6
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user