[all-commits] [llvm/llvm-project] e6605a: DAG: Fix wrong legality check for ISD::FMAD
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Mon Apr 13 10:26:13 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: e6605a209cc7785ae635fee1df7ff4c136d35c17
https://github.com/llvm/llvm-project/commit/e6605a209cc7785ae635fee1df7ff4c136d35c17
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2020-04-13 (Mon, 13 Apr 2020)
Changed paths:
M llvm/include/llvm/CodeGen/TargetLowering.h
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.h
A llvm/test/CodeGen/AMDGPU/fmad-formation-fmul-distribute-denormal-mode.ll
Log Message:
-----------
DAG: Fix wrong legality check for ISD::FMAD
Since 1725f2884175ca618d29b06e35f5c6ebd618053d, this should check
isFMADLegalForFAddFSub rather than the the plain isOperationLegal.
This would assert in a subset of cases due to an oddity in how FMAD is
selected. We will allow FMA formation pre-legalize, but not FMAD even
in cases where it would be valid.
The current hook requires passing in the root fadd/fsub. However, in
this distributed case, this would be far more complicated to pass in
the relevant operand. AMDGPU doesn't get any value from the node, and
only needs the type and is the only implementor, so I'm not sure why
we have this complexity. Just rename and expand the assert to avoid
the more complicated checks spread through the distribution logic.
More information about the All-commits
mailing list