[all-commits] [llvm/llvm-project] 6e3d2a: [ISel] Fix another crash in new FMA DAG combine (#...
Jay Foad via All-commits
all-commits at lists.llvm.org
Fri Sep 29 09:18:36 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6e3d2a4b388288f32ed0441e5c9d1a1e3f886ad7
https://github.com/llvm/llvm-project/commit/6e3d2a4b388288f32ed0441e5c9d1a1e3f886ad7
Author: Jay Foad <jay.foad at amd.com>
Date: 2023-09-29 (Fri, 29 Sep 2023)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
M llvm/test/CodeGen/AMDGPU/dagcombine-fma-crash.ll
Log Message:
-----------
[ISel] Fix another crash in new FMA DAG combine (#67818)
Following on from D135150, this patch fixes another crash caused by this
DAG combine:
fadd (fma A, B, (fmul C, D)), E --> fma A, B, (fma C, D, E)
The combine calls ReplaceAllUsesOfValueWith to replace (fmul C, D) with
(fma C, D, E). This can cause nodes to get CSEd. In D135150 the problem
was that the (fma C, D, E) node got CSEd away. In this new case, the
problem is that the outer fadd node gets CSEd away. To fix it we have
to return SDValue(N, 0) from the combine and be careful not to add a
deleted node to the worklist.
More information about the All-commits
mailing list