1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

[GVNSink] Add unary FNeg support to GVNSink pass

Differential Revision: https://reviews.llvm.org/D63900

llvm-svn: 364678
This commit is contained in:
Cameron McInally 2019-06-28 19:57:31 +00:00
parent e48e888008
commit f51987bd8e
2 changed files with 3 additions and 1 deletions

View File

@ -441,6 +441,7 @@ public:
break;
case Instruction::Call:
case Instruction::Invoke:
case Instruction::FNeg:
case Instruction::Add:
case Instruction::FAdd:
case Instruction::Sub:

View File

@ -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