gcc.c-torture/execute/991112-1.c: set_nonzero_bits_and_sign_copies problem
Joern Rennecke
amylaar@cygnus.co.uk
Wed Dec 1 16:51:00 GMT 1999
The testcase fails for x86 -g -O3 -fomit-frame-pointer .
I have tracked it down to an incorrect setting of reg_nonzero_bits[29].
Before insn 47 is processed, reg_nonzero_bits[29] is 0 (i.e. nothing known
about the contents of (reg:SI 29).
combine_instructions calls set_nonzero_bits_and_sign_copies via note_stores.
This is the insn:
(insn 47 46 48 (set (subreg:QI (reg:SI 29) 0)
(eq:QI (reg:CCNO 17 flags)
(const_int 0 [0x0]))) 409 {*setcc_1} (insn_list 46 (nil))
(expr_list:REG_DEAD (reg:CCNO 17 flags)
(nil)))
And this is set as it is passed to set_nonzero_bits_and_sign_copies:
(set (subreg:QI (reg:SI 29) 0)
(eq:QI (reg:CCNO 17 flags)
(const_int 0 [0x0])))
But then, expand_field_assignment is called, and its
return value is then assigned to set:
(set (reg:SI 29)
(eq:SI (reg:CCNO 17 flags)
(const_int 0 [0x0])))
I.e. we have lost the subreg.
I think we cannot really use expand_field_assignment in this place.
It returns an assignment that would be OK to use instead of the original
one, provided to can be recognized.
But we are not trying to modify code here, but to analyze it.
More information about the Gcc
mailing list