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

Juergen Ributzka juergen at apple.com
Wed Oct 30 13:18:51 PDT 2013


Hi Richard,

the code hits an assertion in the DAG Type Legalizer. It is one of these generic test cases that only fail on the build bots, because there is no explicit target defined in the test case. That is also why I didn’t catch it earlier when I ran the unit tests locally. You can reproduce it by running llc -march systemz test/CodeGen/Generic/select.ll with assertions enabled. 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;
}

Thanks

Cheers,
Juergen


On Oct 30, 2013, at 7:53 AM, Richard Sandiford <rsandifo at linux.vnet.ibm.com> wrote:

> Juergen Ributzka <juergen at apple.com> writes:
>> Author: ributzka
>> Date: Wed Oct 30 01:36:19 2013
>> New Revision: 193677
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=193677&view=rev
>> Log:
>> Revert "SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too."
>> 
>> Now Hexagon and SystemZ are not happy with it :-(
> 
> What SystemZ problem did you see?  I tried reapplying the patch locally
> and it seemed happy (both llvm and clang testsuites).
> 
> Thanks,
> Richard
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131030/4e999145/attachment.html>


More information about the llvm-commits mailing list