[all-commits] [llvm/llvm-project] 0a0734: [AMDGPU] Fixed constexpr expansion to handle multi...
Stanislav Mekhanoshin via All-commits
all-commits at lists.llvm.org
Wed Jun 16 16:58:02 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0a07343e34fc84052e6cc54e55654412b0ed01f4
https://github.com/llvm/llvm-project/commit/0a07343e34fc84052e6cc54e55654412b0ed01f4
Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
Date: 2021-06-16 (Wed, 16 Jun 2021)
Changed paths:
M llvm/lib/IR/ReplaceConstant.cpp
M llvm/test/CodeGen/AMDGPU/lower-kernel-lds-constexpr.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list