mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[GVN] Add support for unary FNeg to GVN pass
Differential Revision: https://reviews.llvm.org/D63896 llvm-svn: 364592
This commit is contained in:
parent
eeac50f7f8
commit
ac2c76b75e
@ -492,6 +492,7 @@ uint32_t GVN::ValueTable::lookupOrAdd(Value *V) {
|
||||
switch (I->getOpcode()) {
|
||||
case Instruction::Call:
|
||||
return lookupOrAddCall(cast<CallInst>(I));
|
||||
case Instruction::FNeg:
|
||||
case Instruction::Add:
|
||||
case Instruction::FAdd:
|
||||
case Instruction::Sub:
|
||||
|
@ -43,9 +43,8 @@ define double @test4(double %x, double %y) {
|
||||
|
||||
define double @test5(double %x, double %y) {
|
||||
; CHECK: @test5(double %x, double %y)
|
||||
; CHECK: %neg1 = fneg double %x, !fpmath !0
|
||||
; CHECK: %neg2 = fneg double %x, !fpmath !1
|
||||
; CHECK: %foo = fadd double %neg1, %neg2
|
||||
; CHECK: %neg1 = fneg double %x, !fpmath !1
|
||||
; CHECK: %foo = fadd double %neg1, %neg1
|
||||
%neg1 = fneg double %x, !fpmath !0
|
||||
%neg2 = fneg double %x, !fpmath !1
|
||||
%foo = fadd double %neg1, %neg2
|
||||
|
Loading…
Reference in New Issue
Block a user