mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Fix using wrong result type for setcc.
When reducing the bitwidth of a comparison against a constant, the original setcc's result type was used, which was incorrect. No test since I don't think any other in tree targets change the bitwidth of the setcc type depending on the bitwidth of the compared type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208236 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -963,6 +963,14 @@ SDValue SelectionDAG::getZExtOrTrunc(SDValue Op, SDLoc DL, EVT VT) {
|
||||
getNode(ISD::TRUNCATE, DL, VT, Op);
|
||||
}
|
||||
|
||||
SDValue SelectionDAG::getBoolExtOrTrunc(SDValue Op, SDLoc SL, EVT VT) {
|
||||
if (VT.bitsLE(Op.getValueType()))
|
||||
return getNode(ISD::TRUNCATE, SL, VT, Op);
|
||||
|
||||
TargetLowering::BooleanContent BType = TLI->getBooleanContents(VT.isVector());
|
||||
return getNode(TLI->getExtendForContent(BType), SL, VT, Op);
|
||||
}
|
||||
|
||||
SDValue SelectionDAG::getZeroExtendInReg(SDValue Op, SDLoc DL, EVT VT) {
|
||||
assert(!VT.isVector() &&
|
||||
"getZeroExtendInReg should use the vector element type instead of "
|
||||
|
Reference in New Issue
Block a user