diff options
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVNSink.cpp | 1 | ||||
-rw-r--r-- | llvm/test/Transforms/GVNSink/fpmath.ll | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNSink.cpp b/llvm/lib/Transforms/Scalar/GVNSink.cpp index 735f68329af..054025755c6 100644 --- a/llvm/lib/Transforms/Scalar/GVNSink.cpp +++ b/llvm/lib/Transforms/Scalar/GVNSink.cpp @@ -441,6 +441,7 @@ public: break; case Instruction::Call: case Instruction::Invoke: + case Instruction::FNeg: case Instruction::Add: case Instruction::FAdd: case Instruction::Sub: diff --git a/llvm/test/Transforms/GVNSink/fpmath.ll b/llvm/test/Transforms/GVNSink/fpmath.ll index 15d86845e0d..69e3a2471e7 100644 --- a/llvm/test/Transforms/GVNSink/fpmath.ll +++ b/llvm/test/Transforms/GVNSink/fpmath.ll @@ -1,8 +1,9 @@ ; RUN: opt -S < %s -gvn-sink | FileCheck %s ; CHECK-LABEL: sink -; CHECK: fneg +; CHECK-NOT: fneg ; CHECK: = phi +; CHECK: fneg define float @sink(float %a, float %b, i1 %cmp) { entry: br i1 %cmp, label %if.then, label %if.else |