insn_info::has_been_deleted () is documented to return true if an instruction is deleted. Such instructions have their `volatile` bit set, which can be tested via rtx_insn::deleted ().
The current condition for insn_info::has_been_deleted () is: * m_rtl is not NULL: this can't happen as no member of insn_info changes this pointer. * !INSN_P (m_rtl): this will likely fail for rtx_insn objects and does not test the `volatile` bit. This patch drops these conditions and calls m_rtl->deleted () instead. The impact of this change is minimal as insn_info::has_been_deleted is only called in insn_info::print_full. Bootstrapped and regtested x86_64-linux. gcc/ChangeLog: * rtl-ssa/insns.h: Fix implementation of has_been_deleted (). Signed-off-by: Christoph Müllner <christoph.muell...@vrull.eu> --- gcc/rtl-ssa/insns.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rtl-ssa/insns.h b/gcc/rtl-ssa/insns.h index d89dfc5c3f66..bb3f52efa83a 100644 --- a/gcc/rtl-ssa/insns.h +++ b/gcc/rtl-ssa/insns.h @@ -186,7 +186,7 @@ public: // Return true if the instruction was a real instruction but has now // been deleted. In this case the instruction is no longer part of // the SSA information. - bool has_been_deleted () const { return m_rtl && !INSN_P (m_rtl); } + bool has_been_deleted () const { return m_rtl->deleted (); } // Return true if the instruction is a debug instruction (and thus // also a real instruction). -- 2.49.0