From b679f78d72b4c688be9df1eda3f51493cca75b75 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 24 Aug 2019 22:17:10 +0000 Subject: [PATCH] AMDGPU: Preserve value name when inserting mul24 intrinsic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369857 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp b/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp index 1840f719631..1640a4a59ee 100644 --- a/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp +++ b/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp @@ -515,7 +515,9 @@ bool AMDGPUCodeGenPrepare::replaceMulWithMul24(BinaryOperator &I) const { } } - I.replaceAllUsesWith(insertValues(Builder, Ty, ResultVals)); + Value *NewVal = insertValues(Builder, Ty, ResultVals); + NewVal->takeName(&I); + I.replaceAllUsesWith(NewVal); I.eraseFromParent(); return true; -- 2.40.0