[llvm-commits] [llvm] r171397 - in /llvm/trunk/test/CodeGen/X86: WidenArith.ll v8i1-masks.ll

Nadav Rotem nrotem at apple.com
Wed Jan 2 09:40:41 PST 2013


Author: nadav
Date: Wed Jan  2 11:40:39 2013
New Revision: 171397

URL: http://llvm.org/viewvc/llvm-project?rev=171397&view=rev
Log:
AVX: Fix a bug in WidenMaskArithmetic.

Added:
    llvm/trunk/test/CodeGen/X86/WidenArith.ll
Modified:
    llvm/trunk/test/CodeGen/X86/v8i1-masks.ll

Added: llvm/trunk/test/CodeGen/X86/WidenArith.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/WidenArith.ll?rev=171397&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/WidenArith.ll (added)
+++ llvm/trunk/test/CodeGen/X86/WidenArith.ll Wed Jan  2 11:40:39 2013
@@ -0,0 +1,23 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck %s
+
+;CHECK: test
+;CHECK: vaddps
+;CHECK: vmulps
+;CHECK: vsubps
+;CHECK: vcmpltps
+;CHECK: vcmpltps
+;CHECK: vandps
+;CHECK: vandps
+;CHECK: ret
+define <8 x i32> @test(<8 x float> %a, <8 x float> %b) {
+ %c1 = fadd <8 x float> %a, %b
+ %b1 = fmul <8 x float> %b, %a
+ %d  = fsub <8 x float> %b1, %c1
+ %res1 = fcmp olt <8 x float> %a, %b1
+ %res2 = fcmp olt <8 x float> %c1, %d
+ %andr = and <8 x i1>%res1, %res2
+ %ex = zext <8 x i1> %andr to <8 x i32>
+ ret <8 x i32>%ex
+}
+
+

Modified: llvm/trunk/test/CodeGen/X86/v8i1-masks.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/v8i1-masks.ll?rev=171397&r1=171396&r2=171397&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/v8i1-masks.ll (original)
+++ llvm/trunk/test/CodeGen/X86/v8i1-masks.ll Wed Jan  2 11:40:39 2013
@@ -2,9 +2,11 @@
 
 ;CHECK: and_masks
 ;CHECK: vmovups
-;CHECK-NEXT: vcmpltp
-;CHECK-NEXT: vandps
-;CHECK-NEXT: vmovups
+;CHECK: vcmpltp
+;CHECK: vcmpltp
+;CHECK: vandps
+;CHECK: vandps
+;CHECK: vmovups
 ;CHECK: ret
 
 define void @and_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
@@ -20,12 +22,11 @@
 }
 
 ;CHECK: neg_mask
-;CHECK:  vmovups
-;CHECK-NEXT: vcmpltps
-;CHECK-NEXT: vandps
-;CHECK-NEXT: vmovups
+;CHECK: vcmpltps
+;CHECK: vxorps
+;CHECK: vandps
+;CHECK: vmovups
 ;CHECK: ret
-
 define void @neg_masks(<8 x float>* %a, <8 x float>* %b, <8 x float>* %c) nounwind uwtable noinline ssp {
   %v0 = load <8 x float>* %a, align 16
   %v1 = load <8 x float>* %b, align 16





More information about the llvm-commits mailing list