[PATCH] Implement computeKnownBits for min/max nodes

Matt Arsenault arsenm2 at gmail.com
Thu Jun 4 11:25:29 PDT 2015


> On Jun 4, 2015, at 11:01 AM, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote:
> 
> ================
> Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2435-2438
> @@ -2434,1 +2434,6 @@
>   }
> +  case ISD::SMIN:
> +  case ISD::SMAX:
> +  case ISD::UMIN:
> +  case ISD::UMAX: {
> +    APInt Op0Zero, Op0One;
> ----------------
> How about adding these cases to the ISD::SELECT case?  (same for sign bits).  That ought to make it obvious we're just analyzing these as SELECT variants.

The operand indices are different. I think it would be more confusing to add logic to add the 1 offset for select



More information about the llvm-commits mailing list