[AMDGPU] Fixed constexpr expansion to handle multiple uses
Recently added convertConstantExprsToInstructions() does not handle a case when a same ConstantExpr used multiple times in the same instruction. A first use is replaced and the rest of the uses in the instruction are replaced as well with the replaceUsesOfWith(). Then function attempts to replace a constant already destroyed. So far this interface is only used by the AMDGPU BE. Differential Revision: https://reviews.llvm.org/D104425
Loading
Please sign in to comment