shader: Store type of phi nodes in flags

This is needed because pseudo-instructions where invalidated.
This commit is contained in:
ReinUsesLisp 2021-03-30 03:19:50 -03:00 committed by ameerj
parent 876dd94b57
commit 2c78d07197
3 changed files with 11 additions and 2 deletions

View file

@ -56,7 +56,11 @@ bool Value::IsLabel() const noexcept {
}
IR::Type Value::Type() const noexcept {
if (IsIdentity() || IsPhi()) {
if (IsPhi()) {
// The type of a phi node is stored in its flags
return inst->Flags<IR::Type>();
}
if (IsIdentity()) {
return inst->Arg(0).Type();
}
if (type == Type::Opaque) {