This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/48377] [4.6/4.7 regression] miscompilation at -O3
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 7 Apr 2011 09:39:32 +0000
- Subject: [Bug middle-end/48377] [4.6/4.7 regression] miscompilation at -O3
- Auto-submitted: auto-generated
- References: <bug-48377-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48377
--- Comment #18 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-07 09:39:13 UTC ---
(In reply to comment #16)
> So perhaps:
>
> bool
> default_builtin_vector_alignment_reachable (const_tree type, bool is_packed)
> {
> - if (is_packed)
> + if (is_packed || (TYPE_USER_ALIGN (type) && compare_tree_int (TYPE_SIZE
> (type), TYPE_ALIGN (type)) == 1)
> return false;
>
> and similarly in rs6000 and other hooks?
> BTW, tree_int_cst_compare (TYPE_SIZE (type), bitsize_int (POINTER_SIZE))
> in the default hook probably should be compare_tree_int too.
I think rather tree-vect-data-refs.c:vector_alignment_reachable_p should
be adjusted. These "packed" checks in the target hooks don't make any
sense to me either. In fact, I fail to see the point of a target hook
completely (if it isn't maybe just for cost issues).