Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/startup_gfx2hlsl_cvt_off_f32_i4_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/startup_image_get_lod_flow_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down
2 changes: 1 addition & 1 deletion tests/startup_image_sample_b_flow_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down
Loading