Nadav Rotem | c8d7047f | 2013-01-02 17:40:39 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck %s |
| 2 | |
Stephen Lin | 6f36b45 | 2013-07-18 22:47:09 +0000 | [diff] [blame] | 3 | ;CHECK-LABEL: test: |
Nadav Rotem | c8d7047f | 2013-01-02 17:40:39 +0000 | [diff] [blame] | 4 | ;CHECK: vaddps |
| 5 | ;CHECK: vmulps |
| 6 | ;CHECK: vsubps |
| 7 | ;CHECK: vcmpltps |
| 8 | ;CHECK: vcmpltps |
| 9 | ;CHECK: vandps |
| 10 | ;CHECK: vandps |
| 11 | ;CHECK: ret |
| 12 | define <8 x i32> @test(<8 x float> %a, <8 x float> %b) { |
| 13 | %c1 = fadd <8 x float> %a, %b |
| 14 | %b1 = fmul <8 x float> %b, %a |
| 15 | %d = fsub <8 x float> %b1, %c1 |
| 16 | %res1 = fcmp olt <8 x float> %a, %b1 |
| 17 | %res2 = fcmp olt <8 x float> %c1, %d |
| 18 | %andr = and <8 x i1>%res1, %res2 |
| 19 | %ex = zext <8 x i1> %andr to <8 x i32> |
| 20 | ret <8 x i32>%ex |
| 21 | } |
| 22 | |
| 23 | |