[all-commits] [llvm/llvm-project] 7002ec: [msan] Convert vector shadow to scalar before ...

Thurston Dang via All-commits all-commits at lists.llvm.org
Wed Jul 3 12:40:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7002ecb4c6dba2050b321699e0e17eb890c3ca2c
      https://github.com/llvm/llvm-project/commit/7002ecb4c6dba2050b321699e0e17eb890c3ca2c
  Author: Thurston Dang <thurston at google.com>
  Date:   2024-07-03 (Wed, 03 Jul 2024)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/test/Instrumentation/MemorySanitizer/vector-track-origins-neon.ll
    M llvm/test/Instrumentation/MemorySanitizer/vector-track-origins-struct.ll

  Log Message:
  -----------
      [msan] Convert vector shadow to scalar before zext (#96722)

zext does not allow converting vector shadow to scalar, so we must
manually convert it prior to calling zext in materializeOneCheck, for
which the 'ConvertedShadow' parameter isn't actually guaranteed to be
scalar (1). Note that it is safe/no-op to call convertShadowToScalar on
a shadow that is already scalar.

In contrast, the storeOrigin function already converts the (potentially
vector) shadow to scalar; we add a comment to note why it is load
bearing.

(1) In materializeInstructionChecks():
"// Disable combining in some cases. TrackOrigins checks each shadow to
pick
 // correct origin.
 bool Combine = !MS.TrackOrigins;
 ...
       if (!Combine) {
        materializeOneCheck(IRB, ConvertedShadow, ShadowData.Origin);
        continue;
      }"



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list