[llvm-commits] [llvm] r140249 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp test/CodeGen/X86/2011-09-21-setcc-bug.ll
Duncan Sands
baldrick at free.fr
Wed Sep 21 07:41:51 PDT 2011
Hi Nadav,
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Wed Sep 21 09:34:38 2011
> @@ -500,6 +500,8 @@
>
> SDValue DAGTypeLegalizer::PromoteIntRes_SETCC(SDNode *N) {
> EVT SVT = TLI.getSetCCResultType(N->getOperand(0).getValueType());
> + // Vector setcc result types need to be leglized.
> + SVT = TLI.getTypeToTransformTo(*DAG.getContext(), SVT);
I think this is obviously wrong. Consider a SETCC with operand type <256 x i8>
and return type <256 x i1>. Then SVT will be <256 x i8> on x86, but this will
then be turned into <128 x i8> by your change, resulting in an invalid SETCC.
Ciao, Duncan.
More information about the llvm-commits
mailing list