1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -S -passes=early-cse -earlycse-debug-hash | FileCheck %s
3 ; RUN: opt < %s -S -passes='early-cse<memssa>' | FileCheck %s
5 ; Ensure we don't simplify away additions vectors of +0.0's (same as scalars).
6 define <4 x float> @fV( <4 x float> %a) {
8 ; CHECK-NEXT: [[B:%.*]] = fadd <4 x float> [[A:%.*]], zeroinitializer
9 ; CHECK-NEXT: ret <4 x float> [[B]]
11 %b = fadd <4 x float> %a, <float 0.0,float 0.0,float 0.0,float 0.0>
15 define <4 x float> @fW( <4 x float> %a) {
17 ; CHECK-NEXT: ret <4 x float> [[A:%.*]]
19 %b = fadd <4 x float> %a, <float -0.0,float -0.0,float -0.0,float -0.0>
24 define void @fX(ptr%p, <4 x float> %a) {
26 ; CHECK-NEXT: [[X:%.*]] = fneg <4 x float> [[A:%.*]]
27 ; CHECK-NEXT: store volatile <4 x float> [[X]], ptr [[P:%.*]], align 16
28 ; CHECK-NEXT: store volatile <4 x float> [[X]], ptr [[P]], align 16
29 ; CHECK-NEXT: ret void
31 %x = fneg <4 x float> %a
32 %y = fneg <4 x float> %a
33 store volatile <4 x float> %x, ptr %p
34 store volatile <4 x float> %y, ptr %p