|
197beb4d
|
2024-02-13T15:47:32
|
|
Metal: Crash if for loop body is optimized away
Loops might have their bodies optimized away.
For case like `for(;;) if(false);` the constant pruning happens at
parse phase. The else branch (e.e. no else branch, nullptr) would be
selected as the body.
Some code treated the body as optional, some code treated it as
required. Define it as required, and remove all conditional code
related to the loop body.
Bug: angleproject:8532
Change-Id: Ic35f1bf78e63ceb2cee7b96ba99e788efc282e6f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5291554
Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com>
Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|