[PATCH] D156706: AMDGPU: Simplify and improve sincos matching

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 16:48:34 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp:1164-1168
+  Sin->replaceAllUsesWith(Call);
+  Sin->eraseFromParent();
+
+  Cos->replaceAllUsesWith(Reload);
+  Cos->eraseFromParent();
----------------
jmmartinez wrote:
> We should also set the debug location for the `Call` to be the one of `Sin`, and the debug locaiton of `Cos` to be the one of `Reload`
I couldn't figure out what to do about the debug loc. There didn't seem to be a update-these-two-for-merge function anywhere. Currently it will get the debug loc for the initial call


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156706/new/

https://reviews.llvm.org/D156706



More information about the llvm-commits mailing list