[LLVMbugs] [Bug 11052] New: SCEV produces two objects for identical inputs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Oct 2 16:04:14 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=11052

           Summary: SCEV produces two objects for identical inputs
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7389)
 --> (http://llvm.org/bugs/attachment.cgi?id=7389)
testcase

A unittest is attached, but the short story is that this:

  SmallVector<const SCEV *, 4> Sum;
  Sum.push_back(SE.getMulExpr(Arg1, Arg2));
  Sum.push_back(SE.getMulExpr(Arg3, Arg2));
  Sum.push_back(SE.getMulExpr(Arg1, Arg4));
  const SCEV *LHS = SE.getAddExpr(Sum);

  const SCEV *RHS = SE.getMulExpr(Arg1, Arg2);
  RHS = SE.getAddExpr(RHS, SE.getMulExpr(Arg3, Arg2));
  RHS = SE.getAddExpr(RHS, SE.getMulExpr(Arg1, Arg4));

produces two different SCEVs:

  LHS: (((%1 + %3) * %0) + (%1 * %2))
  RHS: (((%0 + %2) * %1) + (%0 * %3))

In particular note how everything is in the same order, all 3 MulExpr's are the
same inputs, and they're used in the same order.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list