------- Comment #5 from rguenth at gcc dot gnu dot org 2009-05-23 09:23 ------- Hm, with my fix for PR36327 there is now a natural place to do this in SCCVN. The question is how to properly get to the desired value. We have (bit access ranges):
c.[0..31] = 20; ... = c.[0..7]; ... = c.[8..15]; (or others depending on byte-order). Ideally we can translate this by using a BIT_FIELD_REF on the value stored - at least if both stored value and read value are integral types. For other type mixes proper VIEW_CONVERT_EXPRs need to be done. The question is if it is worth it for non-constants. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35292