[clang] [Clang][CodeGen] Fold forwarding blocks after nested else control flow (PR #207129)

Sergei Druzhkov via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 2 00:27:05 PDT 2026


DrSergei wrote:

Thank you for working on this! I tested your fix, now it works better than before.
```
(lldb) c
Process 7143 resuming

Watchpoint 1 hit:
old value: 3
new value: 42
Process 7143 stopped
* thread #1, name = 'main.exe', stop reason = watchpoint 1
       frame #0: 0x000055555555518f main.exe`main(argc=1, argv=0x00007fffffffd658) at main.cpp:11:3
   8        } else if (i == 2) {
   9          arr[i] = 42;
   10       }
-> 11     }
   12  
   13     x = 1;
   14     for (int i = 0; i < 10; ++i) { // second loop breakpoint
```

I am not an expert in Clang, so can not verify your fix, but I added some reviewers

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


More information about the cfe-commits mailing list