HomePhabricator

[AMDGPU] Avoid DAG combining assert with fneg(fadd(A,0))

Authored by tpr on Apr 17 2019, 10:27 PM.

Description

[AMDGPU] Avoid DAG combining assert with fneg(fadd(A,0))

fneg combining attempts to turn it into fadd(fneg(A), fneg(0)), but
creating the new fadd folds to just fneg(A). When A has multiple uses,
this confuses it and you get an assert. Fixed.

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

Change-Id: I0ddc9b7286abe78edc0cd8d734fdeb05ff09821c
llvm-svn: 358640

Details

Committed
tprApr 17 2019, 10:27 PM
Differential Revision
D60633: [AMDGPU] Avoid DAG combining assert with fneg(fadd(A,0))
Parents
rG6263365b082d: Fix a typo in comments. [NFC]
Branches
Unknown
Tags
Unknown