stop using generated sdnodexforms.
authorChris Lattner <sabre@nondot.org>
Mon, 1 Mar 2010 19:38:53 +0000 (19:38 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 1 Mar 2010 19:38:53 +0000 (19:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97485 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/XCore/XCoreISelDAGToDAG.cpp

index 383fd91d2ef703e2c446e70b8176896264226da5..3e1639e8ab9533177f33a069969fcbdd9d5d0b12 100644 (file)
@@ -164,7 +164,11 @@ SDNode *XCoreDAGToDAGISel::Select(SDNode *N) {
       default: break;
       case ISD::Constant: {
         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,
                                         MVT::i32, MskSize);
         }