-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[msan] Add avx512-intrinsics.ll and avx512-intrinsics-upgrade.ll test case #123980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is forked from llvm/test/CodeGen/X86/avx512-intrinsics-upgrade.ll. It tests intrinsics that LLVM "auto-upgrades"; for example, @llvm.x86.avx512.mask.store is converted into @llvm.masked.store (which has the interesting side effect that MemorySanitizer can already handle it via its existing handleMaskedStore).
You can test this locally with the following command:git diff -U0 --pickaxe-regex -S '([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)' 44f316811016e677ca3e6c6237619e71bae28986 af72ee8c34b11c58afe6e98bcc27090b11cd3257 llvm/test/Instrumentation/MemorySanitizer/X86/avx512-intrinsics-upgrade.ll llvm/test/Instrumentation/MemorySanitizer/X86/avx512-intrinsics.ll The following files introduce new uses of undef:
Undef is now deprecated and should only be used in the rare cases where no replacement is possible. For example, a load of uninitialized memory yields In tests, avoid using For example, this is considered a bad practice: define void @fn() {
...
br i1 undef, ...
} Please use the following instead: define void @fn(i1 %cond) {
...
br i1 %cond, ...
} Please refer to the Undefined Behavior Manual for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be in X86
are those from llvm/test/CodeGen/X86/avx512-intrinsics.ll ?
Fixed. Thanks for catching those! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/11275 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/50/builds/9433 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/10901 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/13521 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/13/builds/4938 Here is the relevant piece of the build log for the reference
|
I had added the test in llvm#123980 and contemporaneously added AVX masked store/load intrinsics (llvm#123857) and forgot to update the test output for the intersection. This patch fixes the output.
….ll test case (#123980)" This reverts commit 980e86f. Reason: buildbot breakage (https://lab.llvm.org/buildbot/#/builders/154/builds/10901/steps/5/logs/FAIL__LLVM__avx512-intrinsics-upgrade_ll)
I had added the test in llvm/llvm-project#123980 and contemporaneously added AVX masked store/load intrinsics (llvm/llvm-project#123857) and forgot to update the test output for the intersection. This patch fixes the output.
…e.ll test case (llvm#123980)" This reverts commit b2647ff i.e., relands llvm@980e86f. I had reverted it because of buildbot failures (e.g., https://lab.llvm.org/buildbot/#/builders/13/builds/4938/steps/5/logs/FAIL__LLVM__avx512-intrinsics-upgrade_ll), which I misdiagnosed. The likely root cause is that the target datalayout had not been specified; this reland adds that.
…e.ll test case (llvm#123980)" This reverts commit b2647ff i.e., relands llvm@980e86f. I had reverted it because of buildbot failures (e.g., https://lab.llvm.org/buildbot/#/builders/13/builds/4938/steps/5/logs/FAIL__LLVM__avx512-intrinsics-upgrade_ll), which I misdiagnosed. The likely root cause is that the target datalayout had not been specified; this reland adds that.
…rinsics (#123857)" This reverts commit b9d301c i.e., relands db79fb2. I had mistakenly thought this caused a buildbot breakage (the actual culprit was my other patch, llvm/llvm-project#123980, which landed at the same time) and thus had reverted it even though AFAIK it is not broken.
…e.ll test case (#123980)" (#124500) This reverts commit b2647ff i.e., relands 980e86f. I had reverted the original patch because of buildbot failures (e.g., https://lab.llvm.org/buildbot/#/builders/13/builds/4938/steps/5/logs/FAIL__LLVM__avx512-intrinsics-upgrade_ll). This reland addresses the likely root cause; namely, that the target datalayout had not been specified. Additionally, this reland improves the test case by replacing undef with extra parameters.
The AVX/SSE variants are already handled heuristically (maybeHandleSimpleNomemIntrinsic via handleUnknownIntrinsic), but the AVX512 variants contain an additional parameter (the rounding method) which fails to match heuristically. This patch generalizes maybeHandleSimpleNomemIntrinsic to allow additional flags (ignored by MSan) and explicitly call it to handle AVX512 min/max ps/pd intrinsics. It also updates the test added in #123980
…124421) The AVX/SSE variants are already handled heuristically (maybeHandleSimpleNomemIntrinsic via handleUnknownIntrinsic), but the AVX512 variants contain an additional parameter (the rounding method) which fails to match heuristically. This patch generalizes maybeHandleSimpleNomemIntrinsic to allow additional flags (ignored by MSan) and explicitly call it to handle AVX512 min/max ps/pd intrinsics. It also updates the test added in llvm/llvm-project#123980
These are forked from the corresponding files in llvm/test/CodeGen/X86/.
avx512-intrinsics.ll shows that many intrinsics are already heuristically handled by MSan, and can be used to track refinements to the intrinsic handling.
avx512-intrinsics-upgrade.ll tests intrinsics that LLVM "auto-upgrades"; for example, @llvm.x86.avx512.mask.store is converted into @llvm.masked.store (which has the interesting side effect that MemorySanitizer can already handle it via its existing handleMaskedStore).