[all-commits] [llvm/llvm-project] d7e626: [msan][NFCI] Add forceIntegerIntrinsic option to h...
Thurston Dang via All-commits
all-commits at lists.llvm.org
Tue Jul 14 16:18:53 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d7e6268cf237308ff84fc1afbb5638862d5cac3f
https://github.com/llvm/llvm-project/commit/d7e6268cf237308ff84fc1afbb5638862d5cac3f
Author: Thurston Dang <thurston at google.com>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Log Message:
-----------
[msan][NFCI] Add forceIntegerIntrinsic option to handleIntrinsicByApplyingToShadow() (#207053)
Currently, if handleIntrinsicByApplyingToShadow() is given an
IntrinsicInst with floating-point arguments, it will cast the shadows to
floating-point, apply the intrinsic, and then cast the result back to
integer/shadow. This is inefficient, and, depending on the intrinsic,
may also result in floating-point exceptions.
The user can explicitly supply an integer variant of the intrinsic to be
applied to the shadow (shadowIntrinsicID), but this does not work if the
integer and floating-point variants are overloaded forms of the same
intrinsic ID.
This patch adds an option, 'forceIntegerIntrinsic', which will pass the
shadows as integers to the intrinsic, thus avoiding unnecessary casts.
(This is not enabled by default since some intrinsics do not support
integer arguments.)
As an example, future work can use 'forceIntegerIntrinsic' to handle
`<16 x float> @llvm.x86.avx512.mask.compress (<16 x float>, <16 x
float>, <16 x i1> %mask)`
with
`<16 x i32> @llvm.x86.avx512.mask.compress (<16 x i32>, <16 x i32>, <16
x i1> %mask)`
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