[llvm-commits] DAG type Legalizer bug?

Guo, Xiaoyi Xiaoyi.Guo at amd.com
Thu Apr 5 14:23:31 PDT 2012


From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Guo, Xiaoyi
Sent: Tuesday, April 03, 2012 11:39 AM
To: llvm-commits at cs.uiuc.edu
Subject: [llvm-commits] FW: DAG type Legalizer bug?

Please review the attached patch which fixes a bug as described below. Our test case fails on amdil backend. I failed to create a test case with one of the backends built-in to llvm. So I couldn't add a test case to the unit test suite.


From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Guo, Xiaoyi
Sent: Friday, March 23, 2012 8:11 PM
To: LLVM Developers Mailing List
Subject: [LLVMdev] DAG type Legalizer bug?

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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120405/13a90943/attachment.html>

More information about the llvm-commits mailing list