[llvm] [SimplifyCFG] Fix hoisting problem in SimplifyCFG (PR #78615)

Quentin Dian via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 06:34:29 PST 2024


DianQK 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);
        }
      }
```

https://github.com/llvm/llvm-project/pull/78615


More information about the llvm-commits mailing list