mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
stop using generated sdnodexforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -164,7 +164,11 @@ SDNode *XCoreDAGToDAGISel::Select(SDNode *N) {
|
|||||||
default: break;
|
default: break;
|
||||||
case ISD::Constant: {
|
case ISD::Constant: {
|
||||||
if (Predicate_immMskBitp(N)) {
|
if (Predicate_immMskBitp(N)) {
|
||||||
SDValue MskSize = Transform_msksize_xform(N);
|
// Transformation function: get the size of a mask
|
||||||
|
int64_t MaskVal = cast<ConstantSDNode>(N)->getZExtValue();
|
||||||
|
assert(isMask_32(MaskVal));
|
||||||
|
// Look for the first non-zero bit
|
||||||
|
SDValue MskSize = getI32Imm(32 - CountLeadingZeros_32(MaskVal));
|
||||||
return CurDAG->getMachineNode(XCore::MKMSK_rus, dl,
|
return CurDAG->getMachineNode(XCore::MKMSK_rus, dl,
|
||||||
MVT::i32, MskSize);
|
MVT::i32, MskSize);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user