OSDN Git Service

Pre-commit InstCombine::visitFNeg(...) test.
authorCameron McInally <cameron.mcinally@nyu.edu>
Fri, 10 May 2019 13:18:57 +0000 (13:18 +0000)
committerCameron McInally <cameron.mcinally@nyu.edu>
Fri, 10 May 2019 13:18:57 +0000 (13:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360424 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/fneg.ll

index 31d72b2..6c1fb11 100644 (file)
@@ -3,6 +3,18 @@
 
 declare void @use(float)
 
+define float @fneg_fneg(float %a) {
+;
+; CHECK-LABEL: @fneg_fneg(
+; CHECK-NEXT:    [[F:%.*]] = fneg float [[A:%.*]]
+; CHECK-NEXT:    [[R:%.*]] = fneg float [[F]]
+; CHECK-NEXT:    ret float [[R]]
+;
+  %f = fneg float %a
+  %r = fneg float %f
+  ret float %r
+}
+
 ; -(X * C) --> X * (-C)
 
 define float @fmul_fsub(float %x) {