Craig Topper | 3699261 | 2011-09-20 07:38:59 +0000 | [diff] [blame] | 1 | ; 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 |
| 2 | |
| 3 | ; UNSAFE: maxpd: |
NAKAMURA Takumi | 6aaf056 | 2011-09-20 14:11:35 +0000 | [diff] [blame^] | 4 | ; UNSAFE: vmaxpd {{.+}}, %xmm |
Craig Topper | 3699261 | 2011-09-20 07:38:59 +0000 | [diff] [blame] | 5 | define <2 x double> @maxpd(<2 x double> %x, <2 x double> %y) { |
| 6 | %max_is_x = fcmp oge <2 x double> %x, %y |
| 7 | %max = select <2 x i1> %max_is_x, <2 x double> %x, <2 x double> %y |
| 8 | ret <2 x double> %max |
| 9 | } |
| 10 | |
| 11 | ; UNSAFE: minpd: |
NAKAMURA Takumi | 6aaf056 | 2011-09-20 14:11:35 +0000 | [diff] [blame^] | 12 | ; UNSAFE: vminpd {{.+}}, %xmm |
Craig Topper | 3699261 | 2011-09-20 07:38:59 +0000 | [diff] [blame] | 13 | define <2 x double> @minpd(<2 x double> %x, <2 x double> %y) { |
| 14 | %min_is_x = fcmp ole <2 x double> %x, %y |
| 15 | %min = select <2 x i1> %min_is_x, <2 x double> %x, <2 x double> %y |
| 16 | ret <2 x double> %min |
| 17 | } |
| 18 | |
| 19 | ; UNSAFE: maxps: |
NAKAMURA Takumi | 6aaf056 | 2011-09-20 14:11:35 +0000 | [diff] [blame^] | 20 | ; UNSAFE: vmaxps {{.+}}, %xmm |
Craig Topper | 3699261 | 2011-09-20 07:38:59 +0000 | [diff] [blame] | 21 | define <4 x float> @maxps(<4 x float> %x, <4 x float> %y) { |
| 22 | %max_is_x = fcmp oge <4 x float> %x, %y |
| 23 | %max = select <4 x i1> %max_is_x, <4 x float> %x, <4 x float> %y |
| 24 | ret <4 x float> %max |
| 25 | } |
| 26 | |
| 27 | ; UNSAFE: minps: |
NAKAMURA Takumi | 6aaf056 | 2011-09-20 14:11:35 +0000 | [diff] [blame^] | 28 | ; UNSAFE: vminps {{.+}}, %xmm |
Craig Topper | 3699261 | 2011-09-20 07:38:59 +0000 | [diff] [blame] | 29 | define <4 x float> @minps(<4 x float> %x, <4 x float> %y) { |
| 30 | %min_is_x = fcmp ole <4 x float> %x, %y |
| 31 | %min = select <4 x i1> %min_is_x, <4 x float> %x, <4 x float> %y |
| 32 | ret <4 x float> %min |
| 33 | } |
| 34 | |
| 35 | ; UNSAFE: vmaxpd: |
| 36 | ; UNSAFE: vmaxpd %ymm |
| 37 | define <4 x double> @vmaxpd(<4 x double> %x, <4 x double> %y) { |
| 38 | %max_is_x = fcmp oge <4 x double> %x, %y |
| 39 | %max = select <4 x i1> %max_is_x, <4 x double> %x, <4 x double> %y |
| 40 | ret <4 x double> %max |
| 41 | } |
| 42 | |
| 43 | ; UNSAFE: vminpd: |
| 44 | ; UNSAFE: vminpd %ymm |
| 45 | define <4 x double> @vminpd(<4 x double> %x, <4 x double> %y) { |
| 46 | %min_is_x = fcmp ole <4 x double> %x, %y |
| 47 | %min = select <4 x i1> %min_is_x, <4 x double> %x, <4 x double> %y |
| 48 | ret <4 x double> %min |
| 49 | } |
| 50 | |
| 51 | ; UNSAFE: vmaxps: |
| 52 | ; UNSAFE: vmaxps %ymm |
| 53 | define <8 x float> @vmaxps(<8 x float> %x, <8 x float> %y) { |
| 54 | %max_is_x = fcmp oge <8 x float> %x, %y |
| 55 | %max = select <8 x i1> %max_is_x, <8 x float> %x, <8 x float> %y |
| 56 | ret <8 x float> %max |
| 57 | } |
| 58 | |
| 59 | ; UNSAFE: vminps: |
| 60 | ; UNSAFE: vminps %ymm |
| 61 | define <8 x float> @vminps(<8 x float> %x, <8 x float> %y) { |
| 62 | %min_is_x = fcmp ole <8 x float> %x, %y |
| 63 | %min = select <8 x i1> %min_is_x, <8 x float> %x, <8 x float> %y |
| 64 | ret <8 x float> %min |
| 65 | } |