[LLVMdev] DAG type Legalizer bug?

Guo, Xiaoyi Xiaoyi.Guo at amd.com
Fri Mar 23 20:11:11 PDT 2012


The following looks like a bug in the legalizer to me.

DAGTypeLegalizer::SplitRes_MERGE_VALUES(SDNode*N, unsigned ResNo, SDValue& Lo, SDValue& Hi) {
  SDValue Op = DisintegrateMERGE_VALUES(N, ResNo);
  GetSplitOp(Op, Lo, Hi);
}

DisintegrateMERGE_VALUE() returns SDValue(N, ResNo), where N is the MERGE_VALUE node itself.
Then GetSplitOp() tries to retrieve split result for N from the SplitVectors cache and hit assert because split result is for N is not in the cache yet.

Seems to me that DisintegrateMERGE_VALUES() should return the corresponding operand for the given ResNo, not the defined value.

Please confirm if it's a bug, or if I'm missing something.

Thanks,
Xiaoyi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120324/aacf5e77/attachment.html>


More information about the llvm-dev mailing list