[tint][ir][wgsl] Remove old phony assignment let logic
Tested that this is dead codes by replacing the else branch with
TINT_ICE and running the test suite.
Fixes: 394353302
Change-Id: I4ed8e859084b8cfe539a1c775ff6dc9dd6455c06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/224636
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
diff --git a/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc b/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc
index 84d1857..ca0dede 100644
--- a/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc
+++ b/src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.cc
@@ -616,13 +616,9 @@
void Let(const core::ir::Let* let) {
auto* result = let->Result(0);
- if (mod.NameOf(result).IsValid() || result->NumUsages() > 0) {
- Symbol name = NameFor(result);
- Append(b.Decl(b.Let(name, Expr(let->Value()))));
- Bind(result, name);
- } else {
- Append(b.Assign(b.Phony(), Expr(let->Value())));
- }
+ Symbol name = NameFor(result);
+ Append(b.Decl(b.Let(name, Expr(let->Value()))));
+ Bind(result, name);
}
void Phony(const core::ir::Phony* phony) { Append(b.Assign(b.Phony(), Expr(phony->Value()))); }