<font size=2 face="sans-serif">Hi All, </font><br><br><font size=2 face="sans-serif">I've been looking at this bug:<br></font><a href="https://bugs.llvm.org/show_bug.cgi?id=37004"><font size=3 color=blue><u>https://bugs.llvm.org/show_bug.cgi?id=37004</u></font></a><font size=3></font><br><br><font size=2 face="sans-serif">In this function:<br>SCEVExpander::ReuseOrCreateCast</font><br><font size=2 face="sans-serif">we use the builder insertion point (BIP
in the code) to check dominance in an assert. Namely, the inserted cast
must dominate the BIP.</font><br><font size=2 face="sans-serif">However, I've come across a situation
where the BIP is actually the PHI at the top of the loop basic block. Since
it's a PHI inside a loop nothing inside that loop will dominate it and
the assert will fail.</font><br><br><font size=2 face="sans-serif">When tracking down this bug I am assuming
that the BIP being a PHI is not correct and that SCEVExpander::ReuseOrCreateCast
should not be called with a PHI as the insertion point. </font><br><font size=2 face="sans-serif">To those who understand the SCEV Expander
does that assumption make sense? Or am I not understanding how this works?</font><br><br><font size=2 face="sans-serif">Thank you,</font><br><font size=2 face="sans-serif">Stefan </font><br><BR>