[PATCH] D137013: [LoongArch][ASAN] Instrumentation pass now uses proper shadow offset

Xi Ruoyao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 29 02:23:52 PDT 2022


xry111 added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:580
   // OR-ing shadow offset if more efficient (at least on x86) if the offset
   // is a power of two, but on ppc64 we have to use add since the shadow
   // offset is not necessary 1/8-th of the address space.  On SystemZ,
----------------
"ppc64" -> "ppc64 and loongarch64"


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:585
   Mapping.OrShadowOffset = !IsAArch64 && !IsPPC64 && !IsSystemZ && !IsPS &&
-                           !IsRISCV64 &&
+                           !IsRISCV64 && !IsLoongArch64 &&
                            !(Mapping.Offset & (Mapping.Offset - 1)) &&
----------------
Hmm, why is "!IsRISCV64" ever here?  Shouldn't it be already excluded by `!(Mapping.Offset & (Mapping.Offset - 1))`?

But this is not related to our change anyway.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137013



More information about the llvm-commits mailing list