Fix alignment for negating bitstructs. Update mingw LLVM versions in CI.

This commit is contained in:
Christoffer Lerno
2023-10-13 13:57:44 +02:00
parent fd21b057eb
commit fed343e3bb
4 changed files with 5 additions and 5 deletions

View File

@@ -97,8 +97,8 @@ jobs:
install: git binutils mingw-w64-x86_64-clang mingw-w64-x86_64-ninja mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-python
- shell: msys2 {0}
run: |
pacman --noconfirm -U https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-llvm-17.0.1-1-any.pkg.tar.zst
pacman --noconfirm -U https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-lld-17.0.1-1-any.pkg.tar.zst
pacman --noconfirm -U https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-llvm-17.0.2-1-any.pkg.tar.zst
pacman --noconfirm -U https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-lld-17.0.2-1-any.pkg.tar.zst
- name: CMake
run: |
cmake -B build -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

View File

@@ -2621,7 +2621,7 @@ static void llvm_emit_unary_expr(GenContext *c, BEValue *value, Expr *expr)
LLVMValueRef val = llvm_load(c, big_int, value->value, value->alignment, "");
val = LLVMBuildNot(c->builder, val, "bnot");
LLVMValueRef store = llvm_emit_alloca(c, big_int, value->alignment, "");
LLVMBuildStore(c->builder, val, store);
llvm_store_to_ptr_raw_aligned(c, store, val, value->alignment);
llvm_value_set_address(value, store, value->type, value->alignment);
return;
}

View File

@@ -216,7 +216,7 @@ entry:
%77 = call i64 @std.io.printfn(ptr %retparam32, ptr @.str.4, i64 8, ptr %varargslots26, i64 3)
%78 = load i104, ptr %b3, align 1
%bnot33 = xor i104 %78, -1
store i104 %bnot33, ptr %1, align 8
store i104 %bnot33, ptr %1, align 1
call void @llvm.memcpy.p0.p0.i32(ptr align 1 %b3, ptr align 1 %1, i32 13, i1 false)
%79 = getelementptr inbounds [13 x i8], ptr %b3, i64 0, i64 0
%80 = load i8, ptr %79, align 1

View File

@@ -10,7 +10,7 @@ const FOO @private = ~(uint)(0);
; ModuleID = 'constants_mingw'
source_filename = "constants_mingw"
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:
target triple = "x86_64-w64-windows-gnu"
@constants_mingw.AA = protected unnamed_addr constant i8 1, align 1