shader: remove IR opcodes and IREmitter helpers that nothing produces

This commit is contained in:
nmzik
2026-10-21 22:19:26 +02:00
parent 286481889f
commit c571d8ed5a
9 changed files with 4 additions and 68 deletions
+1 -4
View File
@@ -10429,14 +10429,12 @@ void TestNewShaderRecompilerNativeU64Translation() {
ir.Emit(IR::ValueOpcode::BitwiseAnd64,
{base, IR::Value(uint64_t{0xff00ff00ff00ff00ull})});
const auto sum = ir.Emit(IR::ValueOpcode::IAdd64, {masked, base});
const auto product = ir.Emit(IR::ValueOpcode::IMul64, {sum, base});
const auto shifted =
ir.Emit(IR::ValueOpcode::ShiftRightArithmetic64, {product, lane});
ir.Emit(IR::ValueOpcode::ShiftRightArithmetic64, {sum, lane});
ir.Emit(IR::ValueOpcode::IEqual64, {shifted, base});
ir.Emit(IR::ValueOpcode::INotEqual64, {shifted, base});
ir.Emit(IR::ValueOpcode::ULessThan64, {shifted, base});
ir.Emit(IR::ValueOpcode::SLessThan64, {shifted, base});
ir.Emit(IR::ValueOpcode::BitCount64, {shifted});
for (const uint32_t count : {1u, 31u, 32u, 33u, 63u}) {
ir.Emit(IR::ValueOpcode::ShiftLeftLogical64, {base, IR::Value(count)});
ir.Emit(IR::ValueOpcode::ShiftRightLogical64, {base, IR::Value(count)});
@@ -10451,7 +10449,6 @@ void TestNewShaderRecompilerNativeU64Translation() {
Check(source.find("OpCapability Int64") != std::string::npos &&
source.find("OpTypeInt 64 0") != std::string::npos &&
SpirvSourceHasInstructionUsing(source, "OpIAdd", "%ulong") &&
SpirvSourceHasInstructionUsing(source, "OpIMul", "%ulong") &&
SpirvSourceHasInstructionUsing(source, "OpBitwiseAnd", "%ulong"),
"U64 arithmetic did not emit native 64-bit scalar instructions");
Check(SpirvInstructionOpcodeCount(spirv, spv::OpIAddCarry) == 0u &&