LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 123 - [X86] div and rem constant exprs invalidate iterators!
Summary: [X86] div and rem constant exprs invalidate iterators!
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: 1.0
Hardware: All All
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2003-11-18 10:34 PST by John T. Criswell
Modified: 2010-02-22 12:48 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John T. Criswell 2003-11-18 10:34:26 PST
The kimwitu++ bytecode file
(/home/vadve/criswell/Downloads/CXXCode/kimwitu++-2.3.8/src/Gen.linux) hits the
following assertion:

lli: /home/vadve/criswell/llvm/lib/Target/X86/InstSelectSimple.cpp:52:
llvm::MachineInstrBuilder llvm::BMI(llvm::MachineBasicBlock*,
__gnu_cxx::__normal_iterator<llvm::MachineInstr**,
std::vector<llvm::MachineInstr*, std::allocator<llvm::MachineInstr*> > >&, int,
unsigned int): Assertion `I >= MBB->begin() && I <= MBB->end() && "Bad
iterator!"' failed.
Comment 1 Chris Lattner 2003-11-18 11:27:42 PST
I can reproduce this with just the _ZN9__gnu_cxx16__stl_next_primeEm function
and LLC.  I'm looking into it.

Thanks!

-Chris
Comment 2 Chris Lattner 2003-11-18 11:48:43 PST
Fixed, here's the patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031117/009616.html

Thanks,

-Chris