[patch] [PR25413] fix natural-alignment assumption in the vectorizer
Dorit Nuzman
DORIT@il.ibm.com
Wed Jul 11 14:45:00 GMT 2007
David Edelsohn <dje@watson.ibm.com> wrote on 10/07/2007 18:21:03:
> I do not understand the intention of this patch for rs6000. Is
> the new hook only implemented for supported vector types? ALIGN_POWER is
> not natural alignment for 64-bit double, so I do not understand why the
> hook returns true for MASK_ALIGN_POWER under TARGET_MACHO and does not
> include a test for AIX.
>
this is exactly what I meant by "I'm not 100% sure about the rs6000
implementation"... :-) ("but even if it's not accurate enough, it is still
an improvement over the current situation."). Is the following ok, or do we
need additional specific tests for AIX?
+ static bool
+ rs6000_vector_alignment_reachable (tree type, bool is_packed)
+ {
+ if (is_packed)
+ return false;
+
+ if (TARGET_32BIT)
+ {
+ if (rs6000_alignment_flags == MASK_ALIGN_NATURAL)
+ return true;
+
+ if (rs6000_alignment_flags == MASK_ALIGN_POWER)
+ return true;
+ }
+ else
+ {
+ if (TARGET_MACHO)
+ return false;
+
+ /* Assuming that all other types are naturally aligned. CHECKME!
*/
+ return true;
+ }
+
+ }
thanks,
dorit
> Thanks, David
>
More information about the Gcc-patches
mailing list