• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -S -early-cse -earlycse-debug-hash | FileCheck %s
2; RUN: opt < %s -S -basic-aa -early-cse-memssa | FileCheck %s
3
4; Ensure we don't simplify away additions vectors of +0.0's (same as scalars).
5define <4 x float> @fV( <4 x float> %a) {
6       ; CHECK: %b = fadd <4 x float> %a, zeroinitializer
7       %b = fadd  <4 x float> %a, <float 0.0,float 0.0,float 0.0,float 0.0>
8       ret <4 x float> %b
9}
10
11define <4 x float> @fW( <4 x float> %a) {
12       ; CHECK: ret <4 x float> %a
13       %b = fadd  <4 x float> %a, <float -0.0,float -0.0,float -0.0,float -0.0>
14       ret <4 x float> %b
15}
16
17; CSE unary fnegs.
18define void @fX(<4 x float> *%p, <4 x float> %a) {
19       ; CHECK: %x = fneg <4 x float> %a
20       ; CHECK-NEXT: store volatile <4 x float> %x, <4 x float>* %p
21       ; CHECK-NEXT: store volatile <4 x float> %x, <4 x float>* %p
22       %x = fneg <4 x float> %a
23       %y = fneg <4 x float> %a
24       store volatile <4 x float> %x, <4 x float>* %p
25       store volatile <4 x float> %y, <4 x float>* %p
26       ret void
27}
28