[LLVMbugs] [Bug 12599] New: FoldMaskAndShiftToScale triggers CSE of node currently being selected

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 19 17:59:06 PDT 2012


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

             Bug #: 12599
           Summary: FoldMaskAndShiftToScale triggers CSE of node currently
                    being selected
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: stoklund at 2pi.dk
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8411
  --> http://llvm.org/bugs/attachment.cgi?id=8411
Bitcode

Reproduce with llc intrablocks.ll:

Assertion failed: (N->getOpcode() != ISD::DELETED_NODE && "DELETED_NODE in
CSEMap!"), function RemoveNodeFromCSEMaps, file
/Volumes/Data/g/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 662.
0  llc               0x0000000105852bb2 PrintStackTrace(void*) + 34
1  llc               0x00000001058530c9 SignalHandler(int) + 697
2  libsystem_c.dylib 0x00007fff90a245ea _sigtramp + 26
3  libsystem_c.dylib 0x00007fff90aac76b __swrite + 0
4  llc               0x0000000105852df6 abort + 22
5  llc               0x0000000105852db5 __assert_rtn + 53
6  llc               0x00000001053cb4de
llvm::SelectionDAG::RemoveNodeFromCSEMaps(llvm::SDNode*) + 718
7  llc               0x00000001053f0306
llvm::SelectionDAG::MorphNodeTo(llvm::SDNode*, unsigned int, llvm::SDVTList,
llvm::SDValue const*, unsigned int) + 374
8  llc               0x0000000105442097
llvm::SelectionDAGISel::MorphNode(llvm::SDNode*, unsigned int, llvm::SDVTList,
llvm::SDValue const*, unsigned int, unsigned int) + 151
9  llc               0x000000010544558c
llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*,
unsigned int) + 13340
10 llc               0x0000000105261f8e (anonymous
namespace)::X86DAGToDAGISel::Select(llvm::SDNode*) + 19886
11 llc               0x000000010543efff
llvm::SelectionDAGISel::DoInstructionSelection() + 735

As far as I can tell, FoldMaskAndShiftToScale() calls ReplaceAllUsesWith()
which triggers a CSE avalanche that eventually eliminated the SDNode currently
being selected.

-- 
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