[PATCH] D89386: [AMDGPU] Fix access beyond the end of the basic block in execMayBeModifiedBeforeAnyUse.

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 11:25:33 PDT 2020


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:7147
+          return false;
+      } else // Reg is a def
+          if (TRI->regsOverlap(Reg, AMDGPU::EXEC)) {
----------------
I do not completely agree with clang tidy here, but I suggest to write "else if" on a single line and adjust indention accordingly.


================
Comment at: llvm/unittests/Target/AMDGPU/ExecMayBeModifiedBeforeAnyUse.cpp:38
+
+  auto Type = FunctionType::get(Type::getVoidTy(Ctx), false);
+  auto F = Function::Create(Type, GlobalValue::ExternalLinkage, "Test", &Mod);
----------------
tidy is right here, "auto *" is preferable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89386



More information about the llvm-commits mailing list