[llvm] r193677 - Revert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too."

Richard Sandiford rsandifo at linux.vnet.ibm.com
Wed Nov 6 04:20:21 PST 2013


Richard Sandiford <rsandifo at linux.vnet.ibm.com> writes:
> Juergen Ributzka <juergen at apple.com> writes:
>> The problem is that getSetCCResultType() always returns a scalar value
>> type and sign extend doesn’t like to convert from vector types to
>> scalar types (v1i32 -> i32). I did a quick hack to
>> getSetCCResultType() in the SystemZ backend, which seems to fix the
>> problem. I am not familiar with the SystemZ mainframes, so I am hoping
>> you could help me by checking and testing the following change:
>>
>> virtual EVT getSetCCResultType(LLVMContext &C, EVT VT) const LLVM_OVERRIDE {
>>   if (VT.isVector())
>>     return EVT::getVectorVT(C, MVT::i32, VT.getVectorNumElements());
>>   else
>>     return MVT::i32;
>> }
>
> Sounds good to me, but it looks like other targets use:
>
>   if (!VT.isVector())
>     return MVT::i32;
>   return VT.changeVectorElementTypeToInteger();
>
> so maybe we should do the same here for consistency.

FWIW, I just committed this as r194148.

Thanks,
Richard





More information about the llvm-commits mailing list