Skip to content

Commit b6fc9c9

Browse files
author
asdadqwe
committed
Broaden AMDGPU m013 suppression
1 parent bd8c6dc commit b6fc9c9

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎amdgpu/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ rediscovering the same issue.
6969
| `FUZZX_ALLOW_M010_I16_SEXT_CLEAR_XOR=1` | unset | Re-enable the `i16` sign-extended identity clear xor shape for [m010](known-miscompiles/m010-i16-sext-clear-xor/NOTES.md). |
7070
| `FUZZX_ALLOW_M011_I8_SEXT_CLEAR_XOR=1` | unset | Re-enable the `i8` sign-extended identity clear xor shape for [m011](known-miscompiles/m011-i8-sext-clear-xor/NOTES.md). |
7171
| `FUZZX_ALLOW_M012_ADD_SHL_LADDER=1` | unset | Alias to re-enable the broader `add/shl` ladder shape for [m012](known-miscompiles/m012-add-shl-ladder/NOTES.md). |
72-
| `FUZZX_ALLOW_M013_PRIVATE_MEMORY_FSHL=1` | unset | Re-enable five-or-more private-memory/funnel-shift ops for [m013](known-miscompiles/m013-private-memory-fshl/NOTES.md). |
72+
| `FUZZX_ALLOW_M013_PRIVATE_MEMORY_FSHL=1` | unset | Re-enable three-or-more private-memory/funnel-shift ops for [m013](known-miscompiles/m013-private-memory-fshl/NOTES.md). |
7373

7474
## Layout
7575

‎amdgpu/fuzzers/llvm-amdgpu-diff/llvm_amdgpu_diff_fuzzer.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ bool isVectorOp(const Op &O) { return O.Kind == 21 || O.Kind == 22; }
274274

275275
bool isPrivateMemoryOp(const Op &O) { return O.Kind == 53 || O.Kind == 58; }
276276

277-
bool hasFivePrivateMemoryOps(ArrayRef<Op> Ops) {
277+
bool hasThreePrivateMemoryOps(ArrayRef<Op> Ops) {
278278
unsigned Count = 0;
279279
for (const Op &O : Ops) {
280-
if (isPrivateMemoryOp(O) && ++Count >= 5)
280+
if (isPrivateMemoryOp(O) && ++Count >= 3)
281281
return true;
282282
}
283283
return false;
@@ -355,7 +355,7 @@ Program makeProgram(const uint8_t *Data, size_t Size) {
355355
P.Ops.back().Kind = 11;
356356
}
357357
}
358-
if (!AllowM013 && hasFivePrivateMemoryOps(P.Ops))
358+
if (!AllowM013 && hasThreePrivateMemoryOps(P.Ops))
359359
P.Ops.back().Kind = 54;
360360
}
361361
P.UseStructuredCFG = P.Ops.size() >= 4 && (BS.next8() & 1);

‎amdgpu/known-miscompiles/m013-private-memory-fshl/NOTES.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ ad 12 ef 8a
8888

8989
## Fuzzer Suppression
9090

91-
The directed C++ fuzzer now caps generated private-memory ops at four by
91+
The directed C++ fuzzer now caps generated private-memory ops at two by
9292
default. Set `FUZZX_ALLOW_M013_PRIVATE_MEMORY_FSHL=1` to re-enable the
93-
five-or-more private-memory/funnel-shift shape when replaying this fuzzer input.
93+
three-or-more private-memory/funnel-shift shape when replaying this fuzzer
94+
input.
95+
96+
A later structured-CFG variant with original fuzzer input SHA-1
97+
`ea7a9d7c7d69ca16f1a670c154a71ed4f71f6e56` showed that three private-memory
98+
ops are enough to hit the same scratch-stack issue, so the suppression is
99+
intentionally broader than the five-copy linear reduced testcase.

0 commit comments

Comments
 (0)