diff options
Diffstat (limited to 'lib/Target/IA64/IA64ISelPattern.cpp')
-rw-r--r-- | lib/Target/IA64/IA64ISelPattern.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/IA64/IA64ISelPattern.cpp b/lib/Target/IA64/IA64ISelPattern.cpp index 06be6ab2e0..2d00c3be47 100644 --- a/lib/Target/IA64/IA64ISelPattern.cpp +++ b/lib/Target/IA64/IA64ISelPattern.cpp @@ -90,7 +90,6 @@ namespace { setOperationAction(ISD::FSQRT, MVT::f32, Expand); //IA64 has these, but they are not implemented - setOperationAction(ISD::CTPOP, MVT::i64 , Expand); setOperationAction(ISD::CTTZ , MVT::i64 , Expand); setOperationAction(ISD::CTLZ , MVT::i64 , Expand); @@ -1600,6 +1599,12 @@ pC = pA OR pB return Result; } + case ISD::CTPOP: { + Tmp1 = SelectExpr(N.getOperand(0)); + BuildMI(BB, IA64::POPCNT, 1, Result).addReg(Tmp1); + return Result; + } + case ISD::SHL: { Tmp1 = SelectExpr(N.getOperand(0)); if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(N.getOperand(1))) { |