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:
parent
e48e888008
commit
f51987bd8e
@ -441,6 +441,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
case Instruction::Call:
|
case Instruction::Call:
|
||||||
case Instruction::Invoke:
|
case Instruction::Invoke:
|
||||||
|
case Instruction::FNeg:
|
||||||
case Instruction::Add:
|
case Instruction::Add:
|
||||||
case Instruction::FAdd:
|
case Instruction::FAdd:
|
||||||
case Instruction::Sub:
|
case Instruction::Sub:
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
; RUN: opt -S < %s -gvn-sink | FileCheck %s
|
; RUN: opt -S < %s -gvn-sink | FileCheck %s
|
||||||
|
|
||||||
; CHECK-LABEL: sink
|
; CHECK-LABEL: sink
|
||||||
; CHECK: fneg
|
; CHECK-NOT: fneg
|
||||||
; CHECK: = phi
|
; CHECK: = phi
|
||||||
|
; CHECK: fneg
|
||||||
define float @sink(float %a, float %b, i1 %cmp) {
|
define float @sink(float %a, float %b, i1 %cmp) {
|
||||||
entry:
|
entry:
|
||||||
br i1 %cmp, label %if.then, label %if.else
|
br i1 %cmp, label %if.then, label %if.else
|
||||||
|
Loading…
Reference in New Issue
Block a user