Skip to content
Draft
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
6 changes: 6 additions & 0 deletions crates/xcl/src/gpu/dxil/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,12 @@ impl Shader {
let rhi = self.m.cast(CastOp::ZExt, rhi, t);
return self.m.bin(BinOp::Or, rlo, rhi);
}
// AMD's driver also returns `x | bfrev(x)` for some `Bfrev.i32(values of a
// computed i64 expression)` and for `Bfrev.i32(countbits(...))` (fuzz seed 1599).
// The group-swap sequence is exact on every adapter and only costs a few ALU ops.
if t == self.m.i32() {
return self.bfrev32_shifts(v);
}
self.op(30, "unary", Some(t), t, &[v], FnAttrs::ReadNone)
}

Expand Down
Loading