brintos

brintos / llvm-project-archived public Read only

0
0
Text · 751 B · 3f92d2b Raw
25 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s3 4; Make sure that vectors get the same benefits as scalars when using unsafe-fp-math.5 6; Subtracting zero is free.7define <4 x float> @vec_fsub_zero(<4 x float> %x) {8; CHECK-LABEL: vec_fsub_zero:9; CHECK:       # %bb.0:10; CHECK-NEXT:    retq11  %sub = fsub <4 x float> %x, zeroinitializer12  ret <4 x float> %sub13}14 15; Negating doesn't require subtraction.16define <4 x float> @vec_fneg(<4 x float> %x) {17; CHECK-LABEL: vec_fneg:18; CHECK:       # %bb.0:19; CHECK-NEXT:    xorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm020; CHECK-NEXT:    retq21  %sub = fsub nsz <4 x float> zeroinitializer, %x22  ret <4 x float> %sub23}24 25