diff --git a/tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py b/tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py index a9904eb8b4..82e86a40e1 100644 --- a/tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py +++ b/tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py @@ -709,8 +709,8 @@ def mutate_plain_5bit(text): def mutate_mod_early_clamp(text): # Swap saturate((...) * 4.0) into (saturate(...)) * 4.0 on lane 2 (v14) - pattern = r'saturate\(\(\(float\(int\(v2 << 28\) >> 28\) \* 0\.0625\)\) \* 4\.0\)' - replacement = r'(saturate((float(int(v2 << 28) >> 28) * 0.0625))) * 4.0' + pattern = r'saturate\(\(\(float\(int\(v2 << 28\) >> 28\) \* 0\.0625(f?)\)\) \* 4\.0\1\)' + replacement = r'(saturate((float(int(v2 << 28) >> 28) * 0.0625\1))) * 4.0\1' mutated, count = re.subn(pattern, replacement, text) assert count == 1 and mutated != text, (count, text) return mutated diff --git a/tests/startup_image_get_lod_flow_check.py b/tests/startup_image_get_lod_flow_check.py index 00be477e5f..a6025572cf 100644 --- a/tests/startup_image_get_lod_flow_check.py +++ b/tests/startup_image_get_lod_flow_check.py @@ -247,7 +247,7 @@ def check_binary(llvm_mc): def mutants(name, hlsl): """HLSL variants that must give another LOD: the branch write dropped, or the EXEC guard dropped.""" - write = re.search(r'\n\s*if \(exec & 1\) v2 = U\((-0\.5|F\(0x3fc00000u\)) \+ F\(v2\)\);', hlsl) + write = re.search(r'\n\s*if \(exec & 1\) v2 = U\((-0\.5f?|F\(0x3fc00000u\)) \+ F\(v2\)\);', hlsl) if name.startswith('join'): return [('without the branch write', hlsl.replace(write.group(0), ''))] if name in ('cmpx', 'inside', 'kill'): diff --git a/tests/startup_image_sample_b_flow_check.py b/tests/startup_image_sample_b_flow_check.py index b51aea26b8..f65038f3e0 100644 --- a/tests/startup_image_sample_b_flow_check.py +++ b/tests/startup_image_sample_b_flow_check.py @@ -382,7 +382,7 @@ def mutants(name, hlsl): """HLSL variants that must read another texel: the branch write dropped, the EXEC guard of the u write dropped, the bias dropped.""" out = [] - write = re.search(r'\n\s*if \(exec & 1\) v2 = U\(-?0\.5 \+ F\(v2\)\);', hlsl) + write = re.search(r'\n\s*if \(exec & 1\) v2 = U\(-?0\.5f? \+ F\(v2\)\);', hlsl) if name.startswith('join'): out.append(('without the branch write', hlsl.replace(write.group(0), ''))) if name in ('cmpx', 'inside', 'kill'):