brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 9dc5940 Raw
37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -S -passes=early-cse -earlycse-debug-hash | FileCheck %s3; RUN: opt < %s -S -passes='early-cse<memssa>' | FileCheck %s4 5; Ensure we don't simplify away additions vectors of +0.0's (same as scalars).6define <4 x float> @fV( <4 x float> %a) {7; CHECK-LABEL: @fV(8; CHECK-NEXT:    [[B:%.*]] = fadd <4 x float> [[A:%.*]], zeroinitializer9; CHECK-NEXT:    ret <4 x float> [[B]]10;11  %b = fadd  <4 x float> %a, <float 0.0,float 0.0,float 0.0,float 0.0>12  ret <4 x float> %b13}14 15define <4 x float> @fW( <4 x float> %a) {16; CHECK-LABEL: @fW(17; CHECK-NEXT:    ret <4 x float> [[A:%.*]]18;19  %b = fadd  <4 x float> %a, <float -0.0,float -0.0,float -0.0,float -0.0>20  ret <4 x float> %b21}22 23; CSE unary fnegs.24define void @fX(ptr%p, <4 x float> %a) {25; CHECK-LABEL: @fX(26; CHECK-NEXT:    [[X:%.*]] = fneg <4 x float> [[A:%.*]]27; CHECK-NEXT:    store volatile <4 x float> [[X]], ptr [[P:%.*]], align 1628; CHECK-NEXT:    store volatile <4 x float> [[X]], ptr [[P]], align 1629; CHECK-NEXT:    ret void30;31  %x = fneg <4 x float> %a32  %y = fneg <4 x float> %a33  store volatile <4 x float> %x, ptr %p34  store volatile <4 x float> %y, ptr %p35  ret void36}37