[llvm-commits] [llvm] r140140 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/avx-minmax.ll

Craig Topper craig.topper at gmail.com
Tue Sep 20 07:37:36 PDT 2011


On Sep 20, 2011, at 1:27 AM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Craig,
> 
>> Extend changes from r139986 to produce 256-bit AVX minps/minpd/maxps/maxpd.
> 
> thanks for doing this.
> 
>> --- llvm/trunk/test/CodeGen/X86/avx-minmax.ll (added)
>> +++ llvm/trunk/test/CodeGen/X86/avx-minmax.ll Tue Sep 20 02:38:59 2011
>> @@ -0,0 +1,65 @@
>> +; RUN: llc<  %s -march=x86-64 -mattr=+avx -asm-verbose=false -join-physregs -enable-unsafe-fp-math -enable-no-nans-fp-math -promote-elements | FileCheck -check-prefix=UNSAFE %s
> 
> Why are -asm-verbose=false -join-physregs needed?

I just copied the run line from the SSE version of the test without actually knowing what those options do. I can remove them if you want.

> 
>> +; UNSAFE: maxpd:
>> +; UNSAFE: vmaxpd %xmm
>> +define<2 x double>  @maxpd(<2 x double>  %x,<2 x double>  %y) {
>> +  %max_is_x = fcmp oge<2 x double>  %x, %y
>> +  %max = select<2 x i1>  %max_is_x,<2 x double>  %x,<2 x double>  %y
>> +  ret<2 x double>  %max
>> +}
> 
> Is producing vmaxpd here rather than maxpd a good thing to do?

That's just what it does in AVX mode. I didn't change anything for the 128-bit case.

> 
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list