Skip to content

Conversation

@thurstond
Copy link
Contributor

@thurstond thurstond commented Feb 20, 2025

This renames the neon_* tests to be more consistent with the original files that they were forked from. This makes it easier for maintainers to see which test files may need to be ported to MSan.

It also fixes the header comment for llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-vcvt.ll (instrumentation was updated in #126136 aka e9e6ba6, but the comment was not).

This renames the neon_* tests to be more consistent with the original
file that they were forked from.

It also fixes the header comment for llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-vcvt.ll (instrumentation was updated in llvm#126136 aka e9e6ba6, but the comment was not).
@thurstond thurstond requested a review from fmayer February 20, 2025 00:50
@thurstond thurstond changed the title [msan][NFCI] Rename tests and update comment [msan][NFCI] Rename NEON tests and update comment Feb 20, 2025
@thurstond thurstond changed the title [msan][NFCI] Rename NEON tests and update comment [msan][NFCI] Rename NEON tests and fix comment Feb 20, 2025
@github-actions
Copy link

⚠️ undef deprecator found issues in your code. ⚠️

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)' 86f0e6dc1177fe45ec6b0ed0707053b28c227321 7eca561dd63f2c7ce8ab1858f12ef6c40972b5f4 llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-vcvt.ll llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-st1.ll llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-st1_lane.ll llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-st1_origins.ll llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-tbl.ll llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-vmul.ll

The following files introduce new uses of undef:

  • llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-st1.ll
  • llvm/test/Instrumentation/MemorySanitizer/AArch64/arm64-vmul.ll

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 undef. You should use poison values for placeholders instead.

In tests, avoid using undef and having tests that trigger undefined behavior. If you need an operand with some unimportant value, you can add a new argument to the function and use that instead.

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.

@thurstond thurstond changed the title [msan][NFCI] Rename NEON tests and fix comment [msan][NFC] Rename NEON tests and fix comment Feb 20, 2025
@thurstond thurstond merged commit d6599fc into llvm:main Mar 3, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants