When enabling IPRA on X86 on spec-2017/503_bwaves, a segfault happened immediately. I tried to lower the issue. It turns out IPRA is not working correctly on below example: https://gcc.godbolt.org/z/6hh88xv9r. Normally, when a certain callee saved register in caller is not live across the the call, callee's push/pop CSR can be optimized out when IPRA is on. (e.g. if I changed the callee to clobber another callee saved register r12, its push/pop can be optimized out: https://gcc.godbolt.org/z/9nbTMe856) While the issue here we can tell from generated codes that rbp is live across call foo, but it's neither saved/reload in caller or callee, which is explicitly a correctness issue.
When enabling IPRA on X86 on spec-2017/503_bwaves, a segfault happened immediately. I tried to lower the issue. It turns out IPRA is not working correctly on below example: https://gcc.godbolt.org/z/6hh88xv9r. Normally, when a certain callee saved register in caller is not live across the the call, callee's `push/pop CSR` can be optimized out when IPRA is on. (e.g. if I changed the callee to clobber another callee saved register r12, its push/pop can be optimized out: https://gcc.godbolt.org/z/9nbTMe856) While the issue here we can tell from generated codes that rbp is live across `call foo`, but it's neither saved/reload in caller or callee, which is explicitly a correctness issue.
When enabling IPRA on X86 on spec-2017/503_bwaves, a segfault happened immediately. I tried to lower the issue. It turns out IPRA is not working correctly on below example: https://gcc.godbolt.org/z/6hh88xv9r. Normally, when a certain callee saved register in caller is not live across the the call, callee's
push/pop CSR
can be optimized out when IPRA is on. (e.g. if I changed the callee to clobber another callee saved register r12, its push/pop can be optimized out: https://gcc.godbolt.org/z/9nbTMe856) While the issue here we can tell from generated codes that rbp is live acrosscall foo
, but it's neither saved/reload in caller or callee, which is explicitly a correctness issue.