From cdba743cd06900e695b091768a69d983da350e92 Mon Sep 17 00:00:00 2001 From: Vladimir Still Date: Wed, 10 Jan 2024 11:03:50 -0800 Subject: [PATCH] Update reference outputs to match fixes in constant folding --- testdata/p4_16_samples_outputs/issue2444-first.p4 | 4 ++-- testdata/p4_16_samples_outputs/issue3219-first.p4 | 4 ++-- testdata/p4_16_samples_outputs/issue3219-frontend.p4 | 2 +- testdata/p4_16_samples_outputs/issue3219-midend.p4 | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testdata/p4_16_samples_outputs/issue2444-first.p4 b/testdata/p4_16_samples_outputs/issue2444-first.p4 index 37592f5e911..f91215342c4 100644 --- a/testdata/p4_16_samples_outputs/issue2444-first.p4 +++ b/testdata/p4_16_samples_outputs/issue2444-first.p4 @@ -1,7 +1,7 @@ const int a = 1; const bool b = true; -const int z = (int)2w1; -const bool w = (bool)(int)2w1; +const int z = 1; +const bool w = true; const int z1 = 1; const bool w1 = true; const int z2 = 3; diff --git a/testdata/p4_16_samples_outputs/issue3219-first.p4 b/testdata/p4_16_samples_outputs/issue3219-first.p4 index 644e103d457..8ffbb0ef22c 100644 --- a/testdata/p4_16_samples_outputs/issue3219-first.p4 +++ b/testdata/p4_16_samples_outputs/issue3219-first.p4 @@ -1,9 +1,9 @@ bit<4> func1() { - bit<4> t = (bit<4>)(int)1; + bit<4> t = 4w1; return t; } bit<4> func2() { - bit<4> t = (bit<4>)(int)4w1; + bit<4> t = 4w1; return t; } control c(out bit<4> result) { diff --git a/testdata/p4_16_samples_outputs/issue3219-frontend.p4 b/testdata/p4_16_samples_outputs/issue3219-frontend.p4 index c9c712e20d1..3c0c8eea0e4 100644 --- a/testdata/p4_16_samples_outputs/issue3219-frontend.p4 +++ b/testdata/p4_16_samples_outputs/issue3219-frontend.p4 @@ -2,7 +2,7 @@ control c(out bit<4> result) { @name("c.retval") bit<4> retval; @name("c.t") bit<4> t_0; apply { - t_0 = (bit<4>)(int)1; + t_0 = 4w1; retval = t_0; result = retval; } diff --git a/testdata/p4_16_samples_outputs/issue3219-midend.p4 b/testdata/p4_16_samples_outputs/issue3219-midend.p4 index 78f78f8caac..efabe485e1f 100644 --- a/testdata/p4_16_samples_outputs/issue3219-midend.p4 +++ b/testdata/p4_16_samples_outputs/issue3219-midend.p4 @@ -1,6 +1,6 @@ control c(out bit<4> result) { @hidden action issue3219l13() { - result = (bit<4>)(int)1; + result = 4w1; } @hidden table tbl_issue3219l13 { actions = {