On Thu, Oct 17, 2013 at 3:10 PM, Jakub Jelinek <[email protected]> wrote:
> On Thu, Oct 17, 2013 at 12:30:46PM -0700, Sriraman Tallam wrote:
>> I checked my build again for these tests and they all pass.
>
> Even on x86_64-linux I can reproduce all of those with
> -m32 -mno-sse.
Figured out why this happens in -m32 -mno-sse mode. This simple patch
that will fix it Basically, there are a couple of more places where
references to global_options need to be fixed. . I am consolidating
the patch for all the x86 test case failures into one patch which I
will later send out for review.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 203830)
+++ config/i386/i386.c (working copy)
@@ -3810,7 +3810,7 @@ ix86_option_override_internal (bool main_args_p,
codegen. We may switch to 387 with -ffast-math for size optimized
functions. */
else if (fast_math_flags_set_p (&global_options)
- && TARGET_SSE2)
+ && TARGET_SSE2_P (opts->x_ix86_isa_flags))
ix86_fpmath = FPMATH_SSE;
else
opts->x_ix86_fpmath = TARGET_FPMATH_DEFAULT_P (opts->x_ix86_isa_flags);
@@ -4566,7 +4566,8 @@ ix86_valid_target_attribute_tree (tree args,
/* If fpmath= is not set, and we now have sse2 on 32-bit, use it. */
if (enum_opts_set.x_ix86_fpmath)
opts_set->x_ix86_fpmath = (enum fpmath_unit) 1;
- else if (!TARGET_64BIT && TARGET_SSE)
+ else if (!TARGET_64BIT_P (opts->x_ix86_isa_flags)
+ && TARGET_SSE_P (opts->x_ix86_isa_flags))
{
opts->x_ix86_fpmath = (enum fpmath_unit) (FPMATH_SSE | FPMATH_387);
>
> Jakub