[llvm-commits] [llvm] r40605 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Chris Lattner clattner at apple.com
Wed Aug 1 17:41:29 PDT 2007


On Jul 30, 2007, at 2:00 PM, Scott Michel wrote:
> Author: pingbak
> Date: Mon Jul 30 16:00:31 2007
> New Revision: 40605
>
> URL: http://llvm.org/viewvc/llvm-project?rev=40605&view=rev
> Log:
> - Allow custom lowering for CTPOP, CTTZ, CTLZ.
> - Fixed an existing unexpanded tab.
> ====================================================================== 
> ========
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jul 30  
> 16:00:31 2007
> @@ -2738,9 +2738,16 @@
>    case ISD::CTLZ:
>      Tmp1 = LegalizeOp(Node->getOperand(0));   // Op
>      switch (TLI.getOperationAction(Node->getOpcode(), Node- 
> >getValueType(0))) {
> -    case TargetLowering::Custom: assert(0 && "Cannot custom handle  
> this yet!");
> +    case TargetLowering::Custom:
>      case TargetLowering::Legal:
>        Result = DAG.UpdateNodeOperands(Result, Tmp1);
> +      if (TLI.getOperationAction(Node->getOpcode(), Node- 
> >getValueType(0)) ==
> +	  TargetLowering::Custom) {
> +	Tmp1 = TLI.LowerOperation(Result, DAG);
> +	if (Tmp1.Val) {
> +	  Result = Tmp1;
> +	}

Hi Scott, speaking of tabs, it looks like some snuck in here.  Can  
you please replace them with spaces?  Thanks,

-Chris




More information about the llvm-commits mailing list