The following fixes the sign conversion check added to properly check
whether the BIT_FIELD_REF does a sign conversion on the original
vector elements instead of a conversion to the target constructor
element type. This avoids disabling all unpacking conversions.
PR tree-optimization/123117
PR target/120234
* tree-ssa-forwprop.cc (simplify_vector_constructor): Fix
sign conversion check guarding unpacking.
== TYPE_PRECISION (TREE_TYPE (type)))
&& orig_elem_type[0]
&& useless_type_conversion_p (orig_elem_type[0],
- TREE_TYPE (type))
+ TREE_TYPE (TREE_TYPE (orig[0])))
&& mode_for_vector (as_a <scalar_mode>
(TYPE_MODE (TREE_TYPE (TREE_TYPE (orig[0])))),
nelts * 2).exists ()
== 2 * TYPE_PRECISION (TREE_TYPE (type)))
&& orig_elem_type[0]
&& useless_type_conversion_p (orig_elem_type[0],
- TREE_TYPE (type))
+ TREE_TYPE (TREE_TYPE (orig[0])))
&& mode_for_vector (as_a <scalar_mode>
(TYPE_MODE
(TREE_TYPE (TREE_TYPE (orig[0])))),