aco/ir: return true in hasRegClass for Operand(reg, rc)
authorGeorg Lehmann <dadschoorse@gmail.com>
Wed, 7 Jun 2023 08:01:06 +0000 (10:01 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 7 Jun 2023 12:30:11 +0000 (12:30 +0000)
Makes isOfType() usable after lower_to_hw_instr.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21402>

src/amd/compiler/aco_ir.h

index 6f7071a..b2365c0 100644 (file)
@@ -748,7 +748,7 @@ public:
 
    constexpr uint32_t tempId() const noexcept { return data_.temp.id(); }
 
-   constexpr bool hasRegClass() const noexcept { return isTemp() || isUndefined(); }
+   constexpr bool hasRegClass() const noexcept { return !isConstant(); }
 
    constexpr RegClass regClass() const noexcept { return data_.temp.regClass(); }