[llvm-commits] [llvm] r154397 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Duncan Sands
baldrick at free.fr
Tue Apr 10 08:03:07 PDT 2012
Hi Nadav, some cosmetic remarks:
> --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Apr 10 09:58:31 2012
> @@ -4354,12 +4354,17 @@
> // Only do this before legalize for now.
> if (VT.isVector()&& !LegalOperations) {
> EVT N0VT = N0.getOperand(0).getValueType();
> + // On some architectures (such as SSE/NEON/etc)the SETCC result type is
missing space between ) and "the".
> + // of the same size as the compared operands. Only optimize sext(setcc())
> + // if this is the case.
> + EVT SVT = TLI.getSetCCResultType(N0VT);
> +
> // We know that the # elements of the results is the same as the
> // # elements of the compare (and the # elements of the compare result
> // for that matter). Check to see that they are the same size. If so,
> // we know that the element size of the sext'd result matches the
> // element size of the compare operands.
This comment ^ is indented too much.
> - if (VT.getSizeInBits() == N0VT.getSizeInBits())
> + if (VT.getSizeInBits() == SVT.getSizeInBits())
> return DAG.getSetCC(N->getDebugLoc(), VT, N0.getOperand(0),
> N0.getOperand(1),
> cast<CondCodeSDNode>(N0.getOperand(2))->get());
Ciao, Duncan.
More information about the llvm-commits
mailing list