[llvm-commits] [llvm] r163086 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp test/CodeGen/ARM/2012-08-30-select.ll

Duncan Sands baldrick at free.fr
Sun Sep 2 05:12:08 PDT 2012


Hi Nadav,

> Generate better select code by allowing the target to use scalar select, and not sign-extend.

I would have expected the DAG combiner to do this if it's an improvement.  What
happens if you change the original code to use getSExtOrTrunc rather than doing
an anyext followed by a sign-extend-in-register?

> +  Mask = DAG.getNode(ISD::SELECT, DL, BitTy, Mask,
> +          DAG.getConstant(APInt::getAllOnesValue(BitTy.getSizeInBits()), BitTy),
> +          DAG.getConstant(3, BitTy));

3?

Ciao, Duncan.



More information about the llvm-commits mailing list