[Mesa-dev] [PATCH v3] llvmpipe: disable VSX in ppc due to LLVM PPC bug

Jose Fonseca jfonseca at vmware.com
Wed Nov 18 10:53:38 PST 2015


On 18/11/15 18:52, Oded Gabbay wrote:
> On Tue, Nov 17, 2015 at 10:35 PM, Oded Gabbay <oded.gabbay at gmail.com> wrote:
>> This patch disables the use of VSX instructions, as they cause some
>> piglit tests to fail
>>
>> For more details, see: https://llvm.org/bugs/show_bug.cgi?id=25503#c7
>>
>> With this patch, ppc64le reaches parity with x86-64 as far as piglit test
>> suite is concerned.
>>
>> v2:
>> - Added check that we have at least LLVM 3.4
>> - Added the LLVM bug URL as a comment in the code
>>
>> v3:
>>
>> - Only disable VSX if Altivec is supported, because if Altivec support
>> is missing, then VSX support doesn't exist anyway.
>>
>> - Change original patch description.
>>
>> Signed-off-by: Oded Gabbay <oded.gabbay at gmail.com>
>> Cc: "11.0" <mesa-stable at lists.freedesktop.org>
>> ---
>>   src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
>> index 7bda118..3ee708f 100644
>> --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
>> +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
>> @@ -536,6 +536,15 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
>>
>>   #if defined(PIPE_ARCH_PPC)
>>      MAttrs.push_back(util_cpu_caps.has_altivec ? "+altivec" : "-altivec");
>> +#if HAVE_LLVM >= 0x0304
>> +   /*
>> +    * Make sure VSX instructions are disabled
>> +    * See LLVM bug https://llvm.org/bugs/show_bug.cgi?id=25503#c7
>> +    */
>> +   if (util_cpu_caps.has_altivec) {
>> +      MAttrs.push_back("-vsx");
>> +   }
>> +#endif
>>   #endif
>>
>>      builder.setMAttrs(MAttrs);
>> --
>> 2.5.0
>>
>
> Hi,
>
> I assume the V3 fixes your comments.
> Could you please give me an r-b ?
>
> Thanks,
>
>     Oded

Thanks.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>




More information about the mesa-dev mailing list