Skip to content

Commit

Permalink
Auto merge of rust-lang#123555 - DianQK:update-llvm-18, r=cuviper
Browse files Browse the repository at this point in the history
Update to LLVM 18.1.3

Fixes rust-lang#122805.

This should work on all targets: https://rust.godbolt.org/z/svW8ha31z.

r? `@cuviper`
  • Loading branch information
bors committed Apr 7, 2024
2 parents af25253 + 5acfe77 commit 0e3235f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/llvm-project
Submodule llvm-project updated 52 files
+7 −0 clang/docs/ReleaseNotes.rst
+2 −2 clang/include/clang/Sema/ScopeInfo.h
+27 −16 clang/lib/CodeGen/CGDecl.cpp
+47 −26 clang/lib/Sema/SemaDecl.cpp
+21 −1 clang/lib/Sema/SemaTemplate.cpp
+2 −2 clang/test/CodeGen/aapcs-align.cpp
+4 −4 clang/test/CodeGen/aapcs64-align.cpp
+6 −18 clang/test/CodeGen/attr-counted-by.c
+15 −12 clang/test/CodeGenCXX/auto-var-init.cpp
+1 −8 clang/test/CodeGenOpenCL/amdgpu-printf.cl
+1 −3 clang/test/OpenMP/bug54082.c
+89 −3 clang/test/SemaCXX/warn-shadow-in-lambdas.cpp
+26 −0 clang/test/SemaTemplate/concepts-friends.cpp
+1 −1 clang/test/SemaTemplate/ctad.cpp
+1 −1 compiler-rt/lib/msan/msan.cpp
+24 −11 compiler-rt/lib/msan/msan.h
+3 −0 compiler-rt/lib/msan/msan_allocator.cpp
+54 −13 compiler-rt/lib/msan/msan_linux.cpp
+18 −25 compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
+13 −2 libcxx/modules/CMakeLists.txt
+4 −3 lld/ELF/Arch/X86_64.cpp
+11 −1 lld/test/ELF/x86-64-gotpc-relax-too-far.s
+1 −1 llvm/CMakeLists.txt
+44 −7 llvm/include/llvm/Support/FormattedStream.h
+3 −0 llvm/lib/Support/FormattedStream.cpp
+7 −4 llvm/lib/Target/ARM/ARMFrameLowering.cpp
+4 −0 llvm/lib/Target/ARM/ARMFrameLowering.h
+10 −13 llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+5 −0 llvm/lib/Target/LoongArch/LoongArchTargetMachine.h
+51 −9 llvm/lib/Target/Mips/MipsExpandPseudo.cpp
+0 −6 llvm/lib/Target/PowerPC/PPCFrameLowering.cpp
+34 −0 llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+53 −27 llvm/lib/Transforms/Scalar/SROA.cpp
+56 −0 llvm/test/CodeGen/ARM/ldst-opt-lr-restored.ll
+47 −0 llvm/test/CodeGen/LoongArch/addrspacecast.ll
+543 −72 llvm/test/CodeGen/Mips/atomic-min-max.ll
+284 −45 llvm/test/CodeGen/PowerPC/crsave.ll
+22 −0 llvm/test/CodeGen/SystemZ/int-usub-12.ll
+2 −0 llvm/test/CodeGen/SystemZ/int-usub-13.ll
+62 −0 llvm/test/Transforms/SROA/vector-promotion.ll
+0 −5 llvm/tools/llvm-mc/llvm-mc.cpp
+0 −7 llvm/tools/llvm-objdump/llvm-objdump.cpp
+1 −1 llvm/utils/lit/lit/__init__.py
+1 −0 mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
+1 −0 mlir/test/Interfaces/TilingInterface/lower-to-loops-using-interface.mlir
+1 −1 mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+3 −1 openmp/runtime/src/kmp.h
+121 −8 openmp/runtime/src/kmp_affinity.cpp
+71 −2 openmp/runtime/src/kmp_affinity.h
+2 −1 openmp/runtime/src/kmp_os.h
+31 −6 openmp/runtime/src/z_Linux_util.cpp
+1 −1 openmp/runtime/test/lit.cfg
35 changes: 35 additions & 0 deletions tests/codegen/issues/issue-122805.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//@ compile-flags: -O
//@ min-llvm-version: 18.1.3

#![crate_type = "lib"]
#![no_std]

// The code is from https://github.com/rust-lang/rust/issues/122805.
// Ensure we do not generate the shufflevector instruction
// to avoid complicating the code.
// CHECK-LABEL: define{{.*}}void @convert(
// CHECK-NOT: shufflevector
// CHECK: insertelement <8 x i16>
// CHECK-NEXT: insertelement <8 x i16>
// CHECK-NEXT: insertelement <8 x i16>
// CHECK-NEXT: insertelement <8 x i16>
// CHECK-NEXT: insertelement <8 x i16>
// CHECK-NEXT: insertelement <8 x i16>
// CHECK-NEXT: insertelement <8 x i16>
// CHECK-NEXT: insertelement <8 x i16>
// CHECK-NEXT: store <8 x i16>
// CHECK-NEXT: ret void
#[no_mangle]
pub fn convert(value: [u16; 8]) -> [u8; 16] {
let addr16 = [
value[0].to_be(),
value[1].to_be(),
value[2].to_be(),
value[3].to_be(),
value[4].to_be(),
value[5].to_be(),
value[6].to_be(),
value[7].to_be(),
];
unsafe { core::mem::transmute::<_, [u8; 16]>(addr16) }
}

0 comments on commit 0e3235f

Please sign in to comment.