[all-commits] [llvm/llvm-project] 5d404d: [msan] Generalize handlePairwiseShadowOrIntrinsic, ...

Thurston Dang via All-commits all-commits at lists.llvm.org
Wed Feb 26 21:57:23 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d404d75cf513f9926209b8dd515083226dae88f
      https://github.com/llvm/llvm-project/commit/5d404d75cf513f9926209b8dd515083226dae88f
  Author: Thurston Dang <thurston at google.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/test/Instrumentation/MemorySanitizer/X86/avx-intrinsics-x86.ll
    M llvm/test/Instrumentation/MemorySanitizer/X86/avx2-intrinsics-x86.ll
    M llvm/test/Instrumentation/MemorySanitizer/X86/mmx-intrinsics.ll
    M llvm/test/Instrumentation/MemorySanitizer/i386/avx-intrinsics-i386.ll
    M llvm/test/Instrumentation/MemorySanitizer/i386/avx2-intrinsics-i386.ll
    M llvm/test/Instrumentation/MemorySanitizer/i386/mmx-intrinsics.ll

  Log Message:
  -----------
  [msan] Generalize handlePairwiseShadowOrIntrinsic, and handle x86 pairwise add/sub (#127567)

x86 pairwise add and sub are currently handled by applying the pairwise add intrinsic to the shadow (https://github.com/llvm/llvm-project/pull/124835), due to the lack of an x86 pairwise OR intrinsic. handlePairwiseShadowOrIntrinsic was added (https://github.com/llvm/llvm-project/pull/126008) to handle Arm
pairwise add, but assumes that the intrinsic operates on each pair of elements as defined by the LLVM type. In contrast, x86 pairwise add/sub may sometimes have e.g., <1 x i64> as a parameter but actually be operating on <2 x i32>.

This patch generalizes handlePairwiseShadowOrIntrinsic, to allow reinterpreting the parameters to be a vector of specified element size, and then uses this function to handle x86 pairwise add/sub.



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