[PATCH] D129505: [GISel] Check useLoadStackGuardNode() before generating LOAD_STACK_GUARD

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 12:17:24 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2083
+    if (TLI.useLoadStackGuardNode()) {
+      GuardVal = MRI->createGenericVirtualRegister(PtrTy);
+      getStackGuard(GuardVal, MIRBuilder);
----------------
Don't see why getStackGuard doesn't just return the virtual register it creates itself


================
Comment at: llvm/test/CodeGen/PowerPC/GlobalISel/ppc-irtranslator-stackprotect.ll:2
+; RUN: llc -verify-machineinstrs -mtriple=ppc64le-linux %s -global-isel -stop-after=irtranslator -o - | FileCheck %s --check-prefix=LINUX
+; RUN: llc -verify-machineinstrs -mtriple=ppc64le-openbsd %s -global-isel -stop-after=irtranslator -o - | FileCheck %s --check-prefix=OPENBSD
+
----------------
Is this actually setting the triple correctly? The OS should be in the 3rd position?


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

https://reviews.llvm.org/D129505



More information about the llvm-commits mailing list