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

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Tue Sep 20 09:52:55 PDT 2011


On Tue, 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?
>
>> +; 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?

Yep, like Stephen said, it's just an 128-bit AVX encoded form!


-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc




More information about the llvm-commits mailing list