On 6/3/25 11:11 AM, Richard Sandiford wrote:
Vineet Gupta <vine...@rivosinc.com> writes:
On 6/3/25 08:24, Richard Sandiford wrote:
I think the issue is that:

(insn 9 8 27 2 (parallel [
             (asm_operands/v ("fsrm %0") ("") 0 [
                     (reg:SI 15 a5 [139])
                 ]
                  [
                     (asm_input:SI ("r") frm-run-1.c:33)
                 ]
                  [] frm-run-1.c:33)
             (clobber (reg:V4096QI 69 frm))
         ]) "frm-run-1.c":33:3 -1
      (nil))

is seen as invalidating FRM and so:

(insn 27 9 28 2 (set (reg:SI 15 a5 [144])
         (reg:SI 69 frm)) "frm-run-1.c":43:1 2829 {frrmsi}
      (nil))

is seen as an uninitialised read.  I suppose clobbers in inline asms
need to be treated as real definitions rather than just kills.

In general or specifically inside of late_combine ?

We can start with the routines that rtl-ssa uses for its dataflow analysis.
Does the patch below help?

Jeff, Eric: any thoughts about this?
The thing is it's a clobber. So late-combine's behavior seems sensible given the dataflow from insn 9. I think we've always interpreted the clobber list as precisely that -- any incoming value is potentially destroyed and we have no knowledge of the outgoing value.

That would in turn mean that insn 27 is (effectively) an uninitialized read.

Jeff

Reply via email to