]> granicus.if.org Git - llvm/commitdiff
[NFC][EarlyCSE] Pre-commit unary FNeg tests.
authorCameron McInally <cameron.mcinally@nyu.edu>
Tue, 6 Aug 2019 16:41:30 +0000 (16:41 +0000)
committerCameron McInally <cameron.mcinally@nyu.edu>
Tue, 6 Aug 2019 16:41:30 +0000 (16:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368056 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/EarlyCSE/floatingpoint.ll

index d6811a3d648ddd872d7e86686b3cd3c3a00ebf0b..de1c1eb4b417f4dbd3125087c306e97539814d33 100644 (file)
@@ -13,3 +13,16 @@ define <4 x float> @fW( <4 x float> %a) {
        %b = fadd  <4 x float> %a, <float -0.0,float -0.0,float -0.0,float -0.0>
        ret <4 x float> %b
 }
+
+; CSE unary fnegs.
+define void @fX(<4 x float> *%p, <4 x float> %a) {
+       ; CHECK: %x = fneg <4 x float> %a
+       ; CHECK: %y = fneg <4 x float> %a
+       ; CHECK-NEXT:  store volatile <4 x float> %x, <4 x float>* %p
+       ; CHECK-NEXT: store volatile <4 x float> %y, <4 x float>* %p
+       %x = fneg <4 x float> %a
+       %y = fneg <4 x float> %a
+       store volatile <4 x float> %x, <4 x float>* %p
+       store volatile <4 x float> %y, <4 x float>* %p
+       ret void
+}