[PATCH] D83850: [AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 06:54:16 PDT 2020


critson marked an inline comment as done.
critson added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp:140-141
 
-  if (!ReadsCond && A->registerDefIsDead(AMDGPU::SCC) &&
-      MI.killsRegister(CondReg, TRI))
+  if (!ReadsCond && A->registerDefIsDead(AMDGPU::SCC)) {
+    if (!MI.killsRegister(CondReg, TRI)) {
+      // Replace AND with MOV
----------------
arsenm wrote:
> Can we do this earlier? Removing the SCC def earlier would be more useful
To the best of my understanding, the earliest this optimisation becomes available is after "Branch Probability Basic Block Placement".   Which is not much earlier.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83850





More information about the llvm-commits mailing list