SuccessChanges

Summary

  1. [mlir] Add alignment attribute to LLVM memory ops and use in vector.transfer (details)
  2. [MC/AsmParser] layout-interdependency.s depends on having a proper triple (details)
  3. [debugify] Add targeted test for 2fa656c, NFC (details)
  4. [analyzer] Inline StringSet that's defined in a header (details)
  5. [ubsan] Check implicit casts in ObjC for-in statements (details)
  6. [Sanitizers] Implement getcpuclockid interceptor (details)
  7. [compiler-rt][MSAN][test] Update buffersize for UTF-8 to C convert (details)
  8. Check output in test/CodeGen/Generic/MIRStripDebug/no-metadata-present.mir, NFC (details)
  9. Revert "[InstCombine] Drop debug loc in TryToSinkInstruction (reland)" (details)
  10. [InstCombine] Erase attribute lists for simplified libcalls (details)
  11. [compiler-rt] Fix compiler warnings and runtime errors in sanitizer RT strxfrm(_l) test cases. (details)
  12. Update ubsan_interface.inc for D71491 (details)
  13. Lowering of OpenMP Parallel operation to LLVM IR 1/n (details)
Commit affbc0cd1cc87826c2636f8903d85c911aef75ff by ntv
[mlir] Add alignment attribute to LLVM memory ops and use in vector.transfer

Summary: The native alignment may generally not be used when lowering a vector.transfer to the underlying load/store operation. This revision fixes the unmasked load/store alignment to match that of the masked path.

Differential Revision: https://reviews.llvm.org/D83684
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
The file was modifiedmlir/integration_test/Dialect/Vector/CPU/test-transfer-write.mlir
The file was modifiedmlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/integration_test/Dialect/Vector/CPU/test-transfer-read.mlir
Commit 427bda4e9b370d8efa96a7dbf503cdcb45616802 by qcolombet
[MC/AsmParser] layout-interdependency.s depends on having a proper triple

Fix the requirements for that test.

NFC
The file was modifiedllvm/test/MC/AsmParser/layout-interdependency.s
Commit e51c7fb842ee61e8002634ad2e8548d748cb6172 by Vedant Kumar
[debugify] Add targeted test for 2fa656c, NFC

https://reviews.llvm.org/D78411 introduced test changes which relied on
the ability to strip debugify metadata even if module-level metadata is
missing. This introduces a more targeted test for that ability.
The file was addedllvm/test/CodeGen/Generic/MIRStripDebug/no-metadata-present.mir
Commit 724afa5a331372ff1684f2bffa6976887490cbaf by benny.kra
[analyzer] Inline StringSet that's defined in a header

That's just asking for ODR violations. Also drop a call to lower()
that's not needed.
The file was modifiedclang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/SmartPtr.h
Commit 8c4a65b9b2ca6961139beca92de37eea479f00fa by Vedant Kumar
[ubsan] Check implicit casts in ObjC for-in statements

Check that the implicit cast from `id` used to construct the element
variable in an ObjC for-in statement is valid.

This check is included as part of a new `objc-cast` sanitizer, outside
of the main 'undefined' group, as (IIUC) the behavior it's checking for
is not technically UB.

The check can be extended to cover other kinds of invalid casts in ObjC.

Partially addresses: rdar://12903059, rdar://9542496

Differential Revision: https://reviews.llvm.org/D71491
The file was modifiedclang/include/clang/Basic/Sanitizers.def
The file was modifiedclang/lib/CodeGen/CGObjC.cpp
The file was modifiedcompiler-rt/lib/ubsan/ubsan_checks.inc
The file was modifiedcompiler-rt/lib/ubsan/ubsan_handlers.h
The file was addedcompiler-rt/test/ubsan/TestCases/Misc/objc-cast.m
The file was modifiedcompiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp
The file was modifiedclang/docs/UndefinedBehaviorSanitizer.rst
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was modifiedclang/lib/Driver/ToolChains/Darwin.cpp
The file was modifiedcompiler-rt/lib/ubsan/ubsan_handlers.cpp
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
The file was modifiedcompiler-rt/lib/ubsan/ubsan_value.h
The file was modifiedclang/test/CodeGenObjC/for-in.m
The file was modifiedcompiler-rt/lib/ubsan/ubsan_value.cpp
Commit 42170b3b4e1f7d30b377a3da07c354feae9b852e by guiand
[Sanitizers] Implement getcpuclockid interceptor

Differential Revision: https://reviews.llvm.org/D83000
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
The file was addedcompiler-rt/test/sanitizer_common/TestCases/Linux/getcpuclockid.c
Commit bf0d060fd4ea1221fdac154e3404e448709e31aa by Jinsong Ji
[compiler-rt][MSAN][test] Update buffersize for UTF-8 to C convert

This is exposed by https://reviews.llvm.org/D83486.
When the host is UTF8, we may get n >10, causing assert failure.
Increase the buffersize to support UTF-8 to C conversion.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D83719
The file was modifiedcompiler-rt/test/msan/strxfrm.cpp
Commit 528a1c56d976be83388782357b3b98711f7dafe0 by Vedant Kumar
Check output in test/CodeGen/Generic/MIRStripDebug/no-metadata-present.mir, NFC
The file was modifiedllvm/test/CodeGen/Generic/MIRStripDebug/no-metadata-present.mir
Commit 3d52b1e81b7b3891d9132d826d4889119fad7d00 by Vedant Kumar
Revert "[InstCombine] Drop debug loc in TryToSinkInstruction (reland)"

This reverts commit 9649c2095f07a392bc2b2a93b5bd6c4c9bf5ba34. See
discussion on the llvm-commits thread: if it's OK to preserve the
location when sinking a call, it's probably OK to always preserve the
location.
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was removedllvm/test/Transforms/InstCombine/sink_to_unreachable_dbg.ll
Commit bfa3b627c6832552a7808a9f0f7f9cab61c7ea1a by guiand
[InstCombine] Erase attribute lists for simplified libcalls

Currently, a transformation like pow(2.0, x) -> exp2(x) copies the pow
attribute list verbatim and applies it to exp2. This works out fine
when the attribute list is empty, but when it isn't clang may error due
due to the mismatch.

The source function and destination don't necessarily have anything
to do with one another, attribute-wise. So it makes sense to remove
the attribute lists (this is similar to what IPO does in this
situation).

This was discovered after implementing the `noundef` param attribute.

Differential Revision: https://reviews.llvm.org/D82820
The file was modifiedllvm/test/Transforms/InstCombine/pow_fp_int.ll
The file was modifiedllvm/test/Transforms/InstCombine/simplify-libcalls.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
Commit 10aa0d7bbc12bf86958bc40943e37b46c6eed04a by mascasa
[compiler-rt] Fix compiler warnings and runtime errors in sanitizer RT strxfrm(_l) test cases.

Summary: Fixed an implicit definition warning by including <string.h>. Also fixed run-time assertions that the return value of strxfrm_l calls is less than the buffer size by increasing the size of the referenced buffer.

Reviewers: morehouse

Reviewed By: morehouse

Subscribers: dberris, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D83593
The file was modifiedcompiler-rt/test/sanitizer_common/TestCases/Posix/strxfrm.c
The file was modifiedcompiler-rt/test/msan/__strxfrm_l.cpp
Commit 004bf35ba04873dc9ab1408bce0d6f2fed03b0ea by Vedant Kumar
Update ubsan_interface.inc for D71491

This should address the bot failure here:

http://lab.llvm.org:8011/builders/sanitizer-windows/builds/66309/
The file was modifiedcompiler-rt/lib/ubsan/ubsan_interface.inc
Commit d9067dca7ba7cda97a86ec22106e06ffc700ecbf by kiran.chandramohan
Lowering of OpenMP Parallel operation to LLVM IR 1/n

This patch introduces lowering of the OpenMP parallel operation to LLVM
IR using the OpenMPIRBuilder.

Functions topologicalSort and connectPhiNodes are generalised so that
they work with operations also. connectPhiNodes is also made static.

Lowering works for a parallel region with multiple blocks. Clauses and
arguments of the OpenMP operation are not handled.

Reviewed By: rriddle, anchu-rajendran

Differential Revision: https://reviews.llvm.org/D81660
The file was modifiedmlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
The file was modifiedmlir/test/Target/openmp-llvm.mlir