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

Duncan Sands baldrick at free.fr
Tue Sep 20 01:27:00 PDT 2011


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?

Ciao, Duncan.



More information about the llvm-commits mailing list