summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-01 19:38:53 +0000
committerChris Lattner <sabre@nondot.org>2010-03-01 19:38:53 +0000
commit3780ca6ef23a6d2918736de6726a3ab2b31a00a5 (patch)
treefd2e5f249b9ad67c3ba437335e6515c1b958b490 /llvm/lib/Target
parent883b868765b0b5f52b41e5099d24969e8f15f1d6 (diff)
downloadbcm5719-llvm-3780ca6ef23a6d2918736de6726a3ab2b31a00a5.tar.gz
bcm5719-llvm-3780ca6ef23a6d2918736de6726a3ab2b31a00a5.zip
stop using generated sdnodexforms.
llvm-svn: 97485
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
index 383fd91d2ef..3e1639e8ab9 100644
--- a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
+++ b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
@@ -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);
}
OpenPOWER on IntegriCloud