> Here's what it looks like in the jump dump, right before the lower subreg > pass: > > [...] > > (insn 63 59 61 3 memcmp.c:81 (clobber (reg:SI 75)) -1 (nil) > (insn_list:REG_LIBCALL 62 (nil))) > > (insn 61 63 62 3 memcmp.c:81 (parallel [ > (set (subreg:HI (reg:SI 75) 0) > (and:HI (subreg:HI (reg:SI 73) 0) > (subreg:HI (reg:SI 74) 0))) > (clobber (reg:CC 13 cc)) > ]) 120 {*andhi3} (nil) > (expr_list:REG_NO_CONFLICT (reg:SI 73) > (expr_list:REG_NO_CONFLICT (reg:SI 74) > (nil)))) > > (insn 62 61 64 3 memcmp.c:81 (parallel [ > (set (subreg:HI (reg:SI 75) 2) > (and:HI (subreg:HI (reg:SI 73) 2) > (subreg:HI (reg:SI 74) 2))) > (clobber (reg:CC 13 cc)) > ]) 120 {*andhi3} (nil) > (insn_list:REG_RETVAL 63 (expr_list:REG_NO_CONFLICT (reg:SI 73) > (expr_list:REG_NO_CONFLICT (reg:SI 74) > (nil)))))
What very likely happens is that the lower subreg pass only "smashes" the REGs in place and doesn't invoke its libcall/retval compensation code because the latter is only run on more complex moves. So it yields (insn 61 152 62 3 memcmp.c:81 (parallel [ (set (reg:HI 93) (and:HI (reg:HI 89) (reg:HI 91))) (clobber (reg:CC 13 cc)) ]) 120 {*andhi3} (nil) (nil)) (insn 62 61 64 3 memcmp.c:81 (parallel [ (set (reg:HI 94 [+2 ]) (and:HI (reg:HI 90 [+2 ]) (reg:HI 92 [+2 ]))) (clobber (reg:CC 13 cc)) ]) 120 {*andhi3} (nil) (insn_list:REG_RETVAL 63 (nil))) (insn 64 62 65 3 memcmp.c:81 (set (reg:HI 76) (reg:HI 93)) 23 {*movhi} (nil) (nil)) which is in my opinion not valid because the live range of (reg:HI 93) crosses the libcall boundary. But Ian has the final say on this stuff. -- Eric Botcazou