1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -mattr=sse2 | FileCheck %s --check-prefixes=ALL,OPT
3 ; RUN: llc < %s -mtriple=i686-- -mattr=sse2 -O0 | FileCheck %s --check-prefixes=ALL,NOOPT
5 @x = external dso_local global double
7 define void @foo() nounwind {
10 ; OPT-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
11 ; OPT-NEXT: xorps %xmm0, %xmm0
12 ; OPT-NEXT: movsd %xmm0, x
13 ; OPT-NEXT: movsd %xmm0, x
14 ; OPT-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
19 ; NOOPT-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
20 ; NOOPT-NEXT: xorps %xmm0, %xmm0
21 ; NOOPT-NEXT: movsd %xmm0, x
22 ; NOOPT-NEXT: xorps %xmm0, %xmm0
23 ; NOOPT-NEXT: movsd %xmm0, x
24 ; NOOPT-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
26 %a = load volatile double, ptr @x
27 store volatile double 0.0, ptr @x
28 store volatile double 0.0, ptr @x
29 %b = load volatile double, ptr @x
33 define void @bar() nounwind {
36 ; ALL-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
38 %c = load volatile double, ptr @x