summaryrefslogtreecommitdiff
path: root/utils/update_mir_test_checks.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/update_mir_test_checks.py')
-rwxr-xr-xutils/update_mir_test_checks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/update_mir_test_checks.py b/utils/update_mir_test_checks.py
index 48f3eead3e5..7b9197474f6 100755
--- a/utils/update_mir_test_checks.py
+++ b/utils/update_mir_test_checks.py
@@ -266,10 +266,13 @@ def mangle_vreg(opcode, current_names):
INSERT_VECTOR_ELT='IVEC',
EXTRACT_VECTOR_ELT='EVEC',
SHUFFLE_VECTOR='SHUF').get(base, base)
+ # Avoid ambiguity when opcodes end in numbers
+ if len(base.rstrip('0123456789')) < len(base):
+ base += '_'
i = 0
for name in current_names:
- if name.startswith(base):
+ if name.rstrip('0123456789') == base:
i += 1
if i:
return '{}{}'.format(base, i)