[llvm] [SimplifyCFG] Fix hoisting problem in SimplifyCFG (PR #78615)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 12:22:01 PST 2024
RouzbehPaktinat wrote:
> > > Causes a crash in stage2 clang: https://llvm-compile-time-tracker.com/show_error.php?commit=e36825ea6feefeef44cca7710d775fba287d3fb2
> >
> >
> > Hi @nikic It should be fixed now.
>
> Could you add the corresponding test cases? I'd like to know what the problem is here. Is this it?
>
> ```diff
> // We are about to skip over a pair of non-identical instructions. Record
> // if any have characteristics that would prevent reordering instructions
> // across them.
> BB1ItrPair.first++;
> SkipFlagsBB1 |= skippedInstrFlags(I1);
> if (SameLevelHoist) {
> for (auto &SuccIterPair : OtherSuccIterPairRange) { // update flags
> Instruction *I = &*SuccIterPair.first;
> Instruction *I = &*SuccIterPair.first++;
> SuccIterPair.second |= skippedInstrFlags(I);
> }
> }
> ```
Problem wasn't about the skipFlags. It was a small bug, I had forgotten to erase the map entry after hoisting instructions.
https://github.com/llvm/llvm-project/pull/78615
More information about the llvm-commits
mailing list