about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorTshepang Mbambo <tshepang@gmail.com>2023-02-18 11:09:40 +0200
committerTshepang Mbambo <tshepang@gmail.com>2023-02-18 11:09:40 +0200
commit8ab795ef0834e28f6c8aee85a30486c09cd2bc35 (patch)
tree78a802814e5ca6cbb7bf493d6c7d0d78b5392585 /compiler/rustc_codegen_llvm/src
parent225e01ee7925fca589bf3955e4158b3f9d64dc85 (diff)
downloadrust-8ab795ef0834e28f6c8aee85a30486c09cd2bc35.tar.gz
rust-8ab795ef0834e28f6c8aee85a30486c09cd2bc35.zip
add a summary, in addition to the link
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/context.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs
index ae9fab71f66..37ee0e14020 100644
--- a/compiler/rustc_codegen_llvm/src/context.rs
+++ b/compiler/rustc_codegen_llvm/src/context.rs
@@ -145,10 +145,13 @@ pub unsafe fn create_module<'ll>(
     let llvm_version = llvm_util::get_version();
     if llvm_version < (16, 0, 0) {
         if sess.target.arch == "s390x" {
-            // See https://reviews.llvm.org/D131158
+            // LLVM 16 data layout changed to always set 64-bit vector alignment,
+            // which is conditional in earlier LLVM versions.
+            // https://reviews.llvm.org/D131158 for the discussion.
             target_data_layout = target_data_layout.replace("-v128:64", "");
         } else if sess.target.arch == "riscv64" {
-            // See https://reviews.llvm.org/D116735
+            // LLVM 16 introduced this change so as to produce more efficient code.
+            // See https://reviews.llvm.org/D116735 for the discussion.
             target_data_layout = target_data_layout.replace("-n32:64-", "-n64-");
         }
     }