mirror of
https://github.com/RPCSX/SPIRV-Tools.git
synced 2024-10-07 00:43:25 +00:00
fix BitCastCombinePass
Some checks failed
Build and Test with Bazel / build (macos-latest) (push) Has been cancelled
Build and Test with Bazel / build (ubuntu-latest) (push) Has been cancelled
Build and Test with Bazel / build (windows-2019) (push) Has been cancelled
iOS / build (macos-12) (push) Has been cancelled
iOS / build (macos-13) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Wasm Build / build (push) Has been cancelled
Some checks failed
Build and Test with Bazel / build (macos-latest) (push) Has been cancelled
Build and Test with Bazel / build (ubuntu-latest) (push) Has been cancelled
Build and Test with Bazel / build (windows-2019) (push) Has been cancelled
iOS / build (macos-12) (push) Has been cancelled
iOS / build (macos-13) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Wasm Build / build (push) Has been cancelled
fix diag message
This commit is contained in:
parent
7ad631f1bf
commit
dafc684588
@ -34,9 +34,13 @@ bool BitCastCombinePass::SimplifyBitcast() {
|
||||
assert(valueId != 0);
|
||||
auto value = context()->get_def_use_mgr()->GetDef(valueId);
|
||||
|
||||
inst->RemoveOperand(2);
|
||||
inst->InsertOperand(2, Operand(value->GetOperand(2)));
|
||||
modified = true;
|
||||
if (value->opcode() == spv::Op::OpBitcast) {
|
||||
// bitcast(X, bitcast(Y, A)) -> bitcast(X, A)
|
||||
// inst->Dump();
|
||||
inst->RemoveOperand(2);
|
||||
inst->InsertOperand(2, Operand(value->GetOperand(2)));
|
||||
modified = true;
|
||||
}
|
||||
});
|
||||
|
||||
return modified;
|
||||
|
@ -796,9 +796,9 @@ spv_result_t StructuredControlFlowChecks(
|
||||
for (auto pred : *block->predecessors()) {
|
||||
if (pred->structurally_reachable() && !construct_blocks.count(pred)) {
|
||||
return _.diag(SPV_ERROR_INVALID_CFG, _.FindDef(pred->id()))
|
||||
<< "block <ID> " << pred->id() << " branches to the "
|
||||
<< "block <ID> " << _.getIdName(pred->id()) << " branches to the "
|
||||
<< construct_name << " construct, but not to the "
|
||||
<< header_name << " <ID> " << header->id();
|
||||
<< header_name << " <ID> " << _.getIdName(header->id());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user