Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
      2 
      3 ; CHECK: foo
      4 ; CHECK: xorps
      5 define void @foo(<4 x float>* %P) {
      6         %T = load <4 x float>, <4 x float>* %P               ; <<4 x float>> [#uses=1]
      7         %S = fadd <4 x float> zeroinitializer, %T                ; <<4 x float>> [#uses=1]
      8         store <4 x float> %S, <4 x float>* %P
      9         ret void
     10 }
     11 
     12 ; CHECK: bar
     13 ; CHECK: pxor
     14 define void @bar(<4 x i32>* %P) {
     15         %T = load <4 x i32>, <4 x i32>* %P         ; <<4 x i32>> [#uses=1]
     16         %S = sub <4 x i32> zeroinitializer, %T          ; <<4 x i32>> [#uses=1]
     17         store <4 x i32> %S, <4 x i32>* %P
     18         ret void
     19 }
     20 
     21 ; Without any type hints from operations, we fall back to the smaller xorps.
     22 ; The IR type <4 x i32> is ignored.
     23 ; CHECK: untyped_zero
     24 ; CHECK: xorps
     25 ; CHECK: movaps
     26 define void @untyped_zero(<4 x i32>* %p) {
     27 entry:
     28   store <4 x i32> zeroinitializer, <4 x i32>* %p, align 16
     29   ret void
     30 }
     31