From 51d4875dbbc41cb9100b91886f57680eeec2fcfb Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 17 Dec 2025 12:37:36 -0800 Subject: [PATCH] nir/algebraic: Detect missing f on F-strings Missing f in other cases seems to be caught either elsewhere in the script or by the C compiler. Fixes: c49d6e04808 ("nir/algebraic: Elide range clamping of f2u sources") Reviewed-by: Alyssa Rosenzweig (cherry picked from commit aba079b3afa0bf28e611772420db053bdff3a6a3) Conflicts: src/compiler/nir/nir_algebraic.py Part-of: --- .pick_status.json | 2 +- src/compiler/nir/nir_algebraic.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index b98bdd5717a..6b2c5915e29 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5144,7 +5144,7 @@ "description": "nir/algebraic: Detect missing f on F-strings", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "c49d6e048087a3a6fd17ca56c1e887c697624adf", "notes": null diff --git a/src/compiler/nir/nir_algebraic.py b/src/compiler/nir/nir_algebraic.py index 5ead743c8c3..8770dcddbc2 100644 --- a/src/compiler/nir/nir_algebraic.py +++ b/src/compiler/nir/nir_algebraic.py @@ -107,6 +107,9 @@ class SearchExpression(object): self.sources = expr[1:] self.ignore_exact = False + assert '{' not in self.opcode, \ + 'Malformed opcode name \"{}\".'.format(self.opcode) + @staticmethod def create(val): if isinstance(val, tuple):