On Tue, May 25, 2021 at 2:04 PM Hongtao Liu <crazy...@gmail.com> wrote: > > On Tue, May 18, 2021 at 11:18 PM Richard Sandiford > <richard.sandif...@arm.com> wrote: > > > > Hongtao Liu via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > > > On Mon, May 17, 2021 at 5:56 PM Richard Sandiford > > > <richard.sandif...@arm.com> wrote: > > >> It looks like the rtx “used” flag is unused for INSNs, so we could > > >> use that as a CALL_INSN flag that indicates a fake call. We could just > > >> need to make: > > >> > > >> /* For all other RTXes clear the used flag on the copy. */ > > >> RTX_FLAG (copy, used) = 0; > > >> > > >> conditional on !INSN_P. > > >> > > > I got another error in > > > > > > @@ -83,6 +83,9 @@ control_flow_insn_p (const rtx_insn *insn) > > > return true; > > > > > > case CALL_INSN: > > > + /* CALL_INSN use "used" flag to indicate it's a fake call. */ > > > + if (RTX_FLAG (insn, used)) > > > + break; > > > > I guess this is because of the nonlocal_goto condition? If so, that Oh, I guess you're meaning can_nonlocal_goto which is inside constrol_flow_insn_p. Sorry for disturbing you. > > could be fixed by adding a REG_EH_REGION note of INT_MIN. Even if we > > don't do that, I think the fix belongs in nonlocal_goto instead. > > > This is error info, IMHO, the fix should be in control_flow_insn_p? > > ../../gcc/gnu-toolchain/pr82735/gcc/testsuite/gcc.target/i386/pr64061.c: > In function ‘foo’: > ../../gcc/gnu-toolchain/pr82735/gcc/testsuite/gcc.target/i386/pr64061.c:21:1: > error: in basic block 5: > 21 | } > | ^ > ../../gcc/gnu-toolchain/pr82735/gcc/testsuite/gcc.target/i386/pr64061.c:21:1: > error: flow control insn inside a basic block > (call_insn 77 50 86 5 (parallel [ > (call (mem:QI (unspec_volatile [ > (const_int 0 [0]) > ] UNSPECV_VZEROUPPER) [0 S1 A8]) > (const_int 0 [0])) > (unspec [ > (const_int 1 [0x1]) > ] UNSPEC_CALLEE_ABI) > ]) -1 > (nil) > (nil)) > during RTL pass: pro_and_epilogue > ../../gcc/gnu-toolchain/pr82735/gcc/testsuite/gcc.target/i386/pr64061.c:21:1: > internal compiler error: in rtl_verify_bb_insns, at cfgrtl.c:2797 > 0x129a2a3 _fatal_insn(char const*, rtx_def const*, char const*, int, > char const*) > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/rtl-error.c:108 > 0xcb8834 rtl_verify_bb_insns > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/cfgrtl.c:2797 > 0xcb8b09 rtl_verify_flow_info_1 > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/cfgrtl.c:2883 > 0xcb9284 rtl_verify_flow_info > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/cfgrtl.c:3125 > 0xc9f44d verify_flow_info() > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/cfghooks.c:267 > 0xcb21b7 checking_verify_flow_info > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/cfghooks.h:212 > 0xcb6a3c commit_edge_insertions() > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/cfgrtl.c:2115 > 0xebfcb8 thread_prologue_and_epilogue_insns() > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/function.c:6136 > 0xec07db rest_of_handle_thread_prologue_and_epilogue > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/function.c:6510 > 0xec09b8 execute > /export/users2/liuhongt/gcc/gnu-toolchain/pr82735/gcc/function.c:6586 > > > > Thanks, > > Richard > > > > -- > BR, > Hongtao
-- BR, Hongtao