dawn-cmake/test/statements/for
Antonio Maiorano e1699caf81 Fix PromoteSideEffectsToDeclTest converting for loop to loop with nested hoisted lets
When converting a for-loop to a loop, we were not cloning the for-loop's
body, but rather the statements within it. This worked fine, except if
we also hoisted a variable to a let within that body, which requires the
body to be cloned for the 'insert before' to work. This change clones
the for-loop body, which fixes the problem, but introduces a block in
the destination AST, which is ugly, but not incorrect.

Bug: tint:1300
Change-Id: I478244d87f8cf58837102004242ba1c835e21710
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78821
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-02-02 14:33:32 +00:00
..
condition Fix PromoteSideEffectsToDeclTest converting for loop to loop with nested hoisted lets 2022-02-02 14:33:32 +00:00
continuing Fix PromoteSideEffectsToDeclTest converting for loop to loop with nested hoisted lets 2022-02-02 14:33:32 +00:00
initializer GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
basic.wgsl [test]: Add some test cases for for-loops 2021-07-08 10:00:17 +00:00
basic.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
basic.wgsl.expected.hlsl Reland "HLSL: force FXC to never unroll loops" 2021-11-25 18:44:50 +00:00
basic.wgsl.expected.msl Restore "MSL writer: make signed int overflow defined behaviour" 2021-07-30 18:59:06 +00:00
basic.wgsl.expected.spvasm [test]: Add some test cases for for-loops 2021-07-08 10:00:17 +00:00
basic.wgsl.expected.wgsl reader/wgsl: Generate ForLoopStatements 2021-07-08 21:23:33 +00:00
complex.wgsl [test]: Add some test cases for for-loops 2021-07-08 10:00:17 +00:00
complex.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
complex.wgsl.expected.hlsl Reland "HLSL: force FXC to never unroll loops" 2021-11-25 18:44:50 +00:00
complex.wgsl.expected.msl Restore "MSL writer: make signed int overflow defined behaviour" 2021-07-30 18:59:06 +00:00
complex.wgsl.expected.spvasm [test]: Add some test cases for for-loops 2021-07-08 10:00:17 +00:00
complex.wgsl.expected.wgsl reader/wgsl: Generate ForLoopStatements 2021-07-08 21:23:33 +00:00
empty.wgsl validation: Error on obviously infinite loops 2022-01-14 17:16:32 +00:00
empty.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
empty.wgsl.expected.hlsl validation: Error on obviously infinite loops 2022-01-14 17:16:32 +00:00
empty.wgsl.expected.msl validation: Error on obviously infinite loops 2022-01-14 17:16:32 +00:00
empty.wgsl.expected.spvasm validation: Error on obviously infinite loops 2022-01-14 17:16:32 +00:00
empty.wgsl.expected.wgsl validation: Error on obviously infinite loops 2022-01-14 17:16:32 +00:00
scoping.wgsl resolver: Migrate validation to behavior analysis 2021-12-03 17:51:48 +00:00
scoping.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
scoping.wgsl.expected.hlsl resolver: Migrate validation to behavior analysis 2021-12-03 17:51:48 +00:00
scoping.wgsl.expected.msl resolver: Migrate validation to behavior analysis 2021-12-03 17:51:48 +00:00
scoping.wgsl.expected.spvasm resolver: Migrate validation to behavior analysis 2021-12-03 17:51:48 +00:00
scoping.wgsl.expected.wgsl resolver: Migrate validation to behavior analysis 2021-12-03 17:51:48 +00:00