Commit 7dc2f66
Reland "[SimplifyCFG]
#76669 taught SimplifyCFG to
handle switches when `default` has only one case. When the `switch`'s
condition is wider than 64 bit, the current implementation can calculate
the wrong default value. This PR skips cases where the condition is too
wide.
(cherry picked from commit 39bb790)switch: Do Not Transform the Default Case if the Condition is Too Wide (#77831)"1 parent 64ed699 commit 7dc2f66
File tree
2 files changed
+38
-0
lines changed- llvm
- lib/Transforms/Utils
- test/Transforms/SimplifyCFG
2 files changed
+38
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5710 | 5710 | | |
5711 | 5711 | | |
5712 | 5712 | | |
| 5713 | + | |
| 5714 | + | |
| 5715 | + | |
| 5716 | + | |
| 5717 | + | |
5713 | 5718 | | |
5714 | 5719 | | |
5715 | 5720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
316 | 349 | | |
317 | 350 | | |
318 | 351 | | |
| |||
0 commit comments