Bruno Cardoso Lopes | b33ea56 | 2011-08-09 03:04:23 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s |
| 2 | |
| 3 | ; CHECK: vcmpltps %ymm |
| 4 | ; CHECK-NOT: vucomiss |
| 5 | define <8 x i32> @cmp00(<8 x float> %a, <8 x float> %b) nounwind readnone { |
| 6 | %bincmp = fcmp olt <8 x float> %a, %b |
| 7 | %s = sext <8 x i1> %bincmp to <8 x i32> |
| 8 | ret <8 x i32> %s |
| 9 | } |
| 10 | |
| 11 | ; CHECK: vcmpltpd %ymm |
| 12 | ; CHECK-NOT: vucomisd |
| 13 | define <4 x i64> @cmp01(<4 x double> %a, <4 x double> %b) nounwind readnone { |
| 14 | %bincmp = fcmp olt <4 x double> %a, %b |
| 15 | %s = sext <4 x i1> %bincmp to <4 x i64> |
| 16 | ret <4 x i64> %s |
| 17 | } |
| 18 | |
| 19 | declare void @scale() nounwind uwtable |
| 20 | |
| 21 | ; CHECK: vucomisd |
| 22 | define void @render() nounwind uwtable { |
| 23 | entry: |
| 24 | br i1 undef, label %for.cond5, label %for.end52 |
| 25 | |
| 26 | for.cond5: |
| 27 | %or.cond = and i1 undef, false |
| 28 | br i1 %or.cond, label %for.body33, label %for.cond5 |
| 29 | |
| 30 | for.cond30: |
| 31 | br i1 false, label %for.body33, label %for.cond5 |
| 32 | |
| 33 | for.body33: |
| 34 | %tobool = fcmp une double undef, 0.000000e+00 |
| 35 | br i1 %tobool, label %if.then, label %for.cond30 |
| 36 | |
| 37 | if.then: |
| 38 | call void @scale() |
| 39 | br label %for.cond30 |
| 40 | |
| 41 | for.end52: |
| 42 | ret void |
| 43 | } |
| 44 | |