[clang] [llvm] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

2024-07-02 Thread Ulrich Weigand via cfe-commits
uweigand wrote: This `/etc/lsb-release` test looks a bit weird to me. Why can't it simply do: ``` echo ${UNAME_MACHINE}-ibm-linux-${LIBC} ``` like the upstream `config.guess` does? That should properly match the other variants that are simply missing one of the triple fields.

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-24 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,94 @@ +//===-- SemaSystemZ.cpp -- SystemZ target-specific routines ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: See comment fix - otherwise SystemZ part LGTM. https://github.com/llvm/llvm-project/pull/93179 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Serialization] Read the initializer for interesting static variables before consuming it (PR #92353)

2024-05-16 Thread Ulrich Weigand via cfe-commits
uweigand wrote: I'm not seeing any failures with this patch on s390x with the regular check-all and check-openmp tests. Do you have a link to the failures you were seeing in the past (was that on the build bot?)? https://github.com/llvm/llvm-project/pull/92353

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,137 @@ +// RUN: %clang_cc1 -triple s390x-ibm-zos \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple s390x-ibm-zos -target-feature +vector \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +//

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,137 @@ +// RUN: %clang_cc1 -triple s390x-ibm-zos \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple s390x-ibm-zos -target-feature +vector \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +//

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +529,324 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-08 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +529,324 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-08 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +529,324 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-08 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +529,324 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-08 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,137 @@ +// RUN: %clang_cc1 -triple s390x-ibm-zos \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple s390x-ibm-zos -target-feature +vector \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +//

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-08 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +529,324 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-08 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +529,324 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-08 Thread Ulrich Weigand via cfe-commits
@@ -529,9 +529,324 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation

[clang] [Clang][Sema] Do not accept "vector _Complex" for AltiVec/ZVector (PR #90467)

2024-04-30 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand closed https://github.com/llvm/llvm-project/pull/90467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Do not accept "vector _Complex" for AltiVec/ZVector (PR #90467)

2024-04-30 Thread Ulrich Weigand via cfe-commits
@@ -1191,6 +1191,10 @@ void DeclSpec::Finish(Sema , const PrintingPolicy ) { // Validate and finalize AltiVec vector declspec. if (TypeAltiVecVector) { +// Complex vector types are not supported. +if (TypeSpecComplex != TSC_unspecified) + S.Diag(TSCLoc,

[clang] [Clang][Sema] Do not accept "vector _Complex" for AltiVec/ZVector (PR #90467)

2024-04-30 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand updated https://github.com/llvm/llvm-project/pull/90467 >From 7f13179745ccc31ceca223c03c6b75fa46b4fe37 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Mon, 29 Apr 2024 15:04:31 +0200 Subject: [PATCH] [Clang][Sema] Do not accept "vector _Complex" for

[clang] [Clang][Sema] Do not accept "vector _Complex" for AltiVec/ZVector (PR #90467)

2024-04-29 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand created https://github.com/llvm/llvm-project/pull/90467 The AltiVec (POWER) and ZVector (IBM Z) language extensions do not support using the "vector" keyword when the element type is a complex type, but current code does not verify this. Add a Sema check and

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-22 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > > For SystemZ the correct value is 256. > > Thanks! Double-checking: for both constructive and destructive? Yes, for both. Every SystemZ model (supported by GCC/LLVM) has a L1 cache line size of 256 bytes. > > In general I agree it makes sense to look at the GCC

[clang] [C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (PR #89446)

2024-04-21 Thread Ulrich Weigand via cfe-commits
uweigand wrote: For SystemZ the correct value is 256. In general I agree it makes sense to look at the GCC implementation as a source of reasonable values. Also, I think there probably should be no generic default value at all - it there is no platform-specific value known, it seems

[clang] [llvm] [GOFF][z/OS] Change PrivateGlobalPrefix and PrivateLabelPrefix to be L# (PR #85730)

2024-03-20 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/85730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c9062e8 - Reapply [libomptarget] Build plugins-nextgen for SystemZ (#83978)

2024-03-15 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2024-03-15T19:06:43+01:00 New Revision: c9062e8f786864f86d330babce78a1926cc5b072 URL: https://github.com/llvm/llvm-project/commit/c9062e8f786864f86d330babce78a1926cc5b072 DIFF:

[clang] 70677c8 - Revert "[libomptarget] Build plugins-nextgen for SystemZ (#83978)"

2024-03-06 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2024-03-06T21:37:43+01:00 New Revision: 70677c81debbeacfc2a2fe968e632522ea1b53e1 URL: https://github.com/llvm/llvm-project/commit/70677c81debbeacfc2a2fe968e632522ea1b53e1 DIFF:

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-06 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand closed https://github.com/llvm/llvm-project/pull/83978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-06 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand updated https://github.com/llvm/llvm-project/pull/83978 >From e0cca3ddec75c7624c27a75ae6741dee3b0044fa Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 5 Mar 2024 10:03:55 +0100 Subject: [PATCH] [libomptarget] Build plugins-nextgen for SystemZ The plugin

[clang] [llvm] [openmp] [libomptarget] Build plugins-nextgen for SystemZ (PR #83978)

2024-03-05 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand created https://github.com/llvm/llvm-project/pull/83978 The plugin was not getting built as the build_generic_elf64 macro assumes the LLVM triple processor name matches the CMake processor name, which is unfortunately not the case for SystemZ. Fix this by

[libcxx] [mlir] [llvm] [compiler-rt] [clang] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-19 Thread Ulrich Weigand via cfe-commits
uweigand wrote: @MaskRay I've done a bit more analysis now, and what seems to be going on is that with stack safety analysis off, this check: ``` char array[len]; assert(!(reinterpret_cast(array) & 31L)); ``` succeeds because the VLA allocation gets instrumented, and therefore the VLA

[llvm] [compiler-rt] [libcxx] [clang] [mlir] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-16 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > This now causes failures in the SystemZ build bot: > https://lab.llvm.org/buildbot/#/builders/94/builds/18295 Looking at this a bit more, before this patch the stack alignment test passes because the IR is instrumented to include a call to `__asan_alloca_poison` using a

[libcxx] [clang] [mlir] [compiler-rt] [llvm] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-15 Thread Ulrich Weigand via cfe-commits
uweigand wrote: This now causes failures in the SystemZ build bot: https://lab.llvm.org/buildbot/#/builders/94/builds/18295 https://github.com/llvm/llvm-project/pull/77210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [SystemZ][z/OS] Add support for recognizing z/OS personality function in Clang (PR #76073)

2024-01-15 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/76073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-15 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand closed https://github.com/llvm/llvm-project/pull/74625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
uweigand wrote: Fixed merge conflicts, updated as described above, and fixed support for i128 parameters in the z/OS XPLINK ABI. https://github.com/llvm/llvm-project/pull/74625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
uweigand wrote: > I have looked through the changes and made some comments inline. Thanks for the review! > Commenting: Fixed, thanks! > I happened to notice some cases with room for improvement: Good catch. I've not addressed these right now, this can be done as a follow-up. (The memory

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
@@ -1516,48 +1536,206 @@ let Predicates = [FeatureVector] in { } } +//===--===// +// Support for 128-bit integer values in vector registers

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
@@ -6481,6 +6737,71 @@ SDValue SystemZTargetLowering::combineLOAD( SDNode *N, DAGCombinerInfo ) const { SelectionDAG = DCI.DAG; EVT LdVT = N->getValueType(0); + SDLoc DL(N); + + // Replace an i128 load that is used solely to move its value into GPRs + // by

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
@@ -2918,16 +3049,17 @@ static Comparison getCmp(SelectionDAG , SDValue CmpOp0, SDValue CmpOp1, bool IsSignaling = false) { if (CmpOp1.getOpcode() == ISD::Constant) { assert(!Chain); -uint64_t Constant = cast(CmpOp1)->getZExtValue();

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
@@ -2772,6 +2837,27 @@ static unsigned getTestUnderMaskCond(unsigned BitSize, unsigned CCMask, // Update the arguments with the TM version if so. static void adjustForTestUnderMask(SelectionDAG , const SDLoc , Comparison ) { + // Use VECTOR

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
@@ -1466,7 +1509,15 @@ static SDValue convertValVTToLocVT(SelectionDAG , const SDLoc , static SDValue lowerI128ToGR128(SelectionDAG , SDValue In) { SDLoc DL(In); SDValue Lo, Hi; - std::tie(Lo, Hi) = DAG.SplitScalar(In, DL, MVT::i64, MVT::i64); + if

[clang] [llvm] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-14 Thread Ulrich Weigand via cfe-commits
@@ -1183,6 +1187,35 @@ void SystemZDAGToDAGISel::loadVectorConstant( SelectCode(Op.getNode()); } +SDNode *SystemZDAGToDAGISel::loadPoolVectorConstant(APInt Val, EVT VT, SDLoc DL) { + SDNode *ResNode; + assert (VT.getSizeInBits() == 128); + + SDValue CP =

[llvm] [clang] [SystemZ] Support i128 as legal type in VRs (PR #74625)

2023-12-06 Thread Ulrich Weigand via cfe-commits
uweigand wrote: @JonPsson1 - please have a look at the effects of i128 support in particular on atomics @redstar - can you check impact on the z/OS ABI? we may need to handle legal i128 there too, but there doesn't appear to be any in-tree test case for passing i128 on z/OS Any other

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-12-04 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. This version LGTM now. https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9d27139 - [SystemZ] Fix __builtin_s390_vceq* inconsistency

2023-12-04 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2023-12-04T17:00:05+01:00 New Revision: 9d27139293890a18b903c62f2c43954cc2bc302d URL: https://github.com/llvm/llvm-project/commit/9d27139293890a18b903c62f2c43954cc2bc302d DIFF:

[clang] dca432c - [SystemZ] Fix naming of vlrlr/vstrlr builtins

2023-12-04 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2023-12-04T16:53:18+01:00 New Revision: dca432cb7b1c282f5dc861095813c4f40f109619 URL: https://github.com/llvm/llvm-project/commit/dca432cb7b1c282f5dc861095813c4f40f109619 DIFF:

[clang] c61eb44 - [SystemZ] Implement vector rotate in terms of funnel shift

2023-12-04 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2023-12-04T16:52:00+01:00 New Revision: c61eb440059d6e9c18e6f8404e06bf125aa942c9 URL: https://github.com/llvm/llvm-project/commit/c61eb440059d6e9c18e6f8404e06bf125aa942c9 DIFF:

[llvm] [clang] [clang, SystemZ] Pass HasDef flag to getMinGlobalAlign(). (PR #73511)

2023-11-28 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/73511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang, SystemZ] Pass HasDef flag to getMinGlobalAlign(). (PR #73511)

2023-11-28 Thread Ulrich Weigand via cfe-commits
@@ -1687,7 +1687,8 @@ CharUnits ASTContext::getDeclAlign(const Decl *D, bool ForAlignof) const { if (VD->hasGlobalStorage() && !ForAlignof) { uint64_t TypeSize = !BaseT->isIncompleteType() ? getTypeSize(T.getTypePtr()) : 0; -Align =

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-27 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. This version LGTM now, thanks! https://github.com/llvm/llvm-project/pull/68926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,71 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() for __int128 with default alignment (8 +// bytes), atomic

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,71 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py +// RUN: %clang_cc1 -triple s390x-linux-gnu -O1 -emit-llvm %s -o - | FileCheck %s +// +// Test __atomic_is_lock_free() for __int128 with default alignment (8 +// bytes), atomic

[llvm] [clang] [SystemZ] Properly support 16 byte atomic int/fp types and ops. (PR #73134)

2023-11-24 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: Not sure about the is_lock_free results, see inline comments. What does recent GCC return for those? https://github.com/llvm/llvm-project/pull/73134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [SystemZ] Move new test into existing CodeGen test. (PR #73230)

2023-11-23 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/73230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-23 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,72 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static std::string getProductID(Module ) { + std::string ProductID; + if (auto *MD = M.getModuleFlag("zos_product_id")) +ProductID = cast(MD)->getString().str(); + if

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,46 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,71 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = mdconst::extract_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,71 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = mdconst::extract_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-14 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: Please find a couple of additional comments inline, related to module flag processing. https://github.com/llvm/llvm-project/pull/68926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-14 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,40 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-14 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-14 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-14 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/68926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-14 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-14 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[clang] [SystemZ] Do not run mbackchain-4.c test without SystemZ target (PR #71678)

2023-11-08 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. LGTM - sorry for missing that. https://github.com/llvm/llvm-project/pull/71678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [SystemZ] Add backchain target-feature (PR #71668)

2023-11-08 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. LGTM. Thanks for taking care of this, Ilya! https://github.com/llvm/llvm-project/pull/71668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-31 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,40 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-31 Thread Ulrich Weigand via cfe-commits
@@ -1765,7 +1765,7 @@ void Clang::RenderTargetOptions(const llvm::Triple , break; case llvm::Triple::systemz: -AddSystemZTargetArgs(Args, CmdArgs); +AddSystemZTargetArgs(EffectiveTriple, Args, CmdArgs); uweigand wrote: This (and the related)

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-31 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,40 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-31 Thread Ulrich Weigand via cfe-commits
@@ -90,6 +90,7 @@ LANGOPT(C23 , 1, 0, "C23") LANGOPT(MSVCCompat, 1, 0, "Microsoft Visual C++ full compatibility mode") LANGOPT(Kernel, 1, 0, "Kernel mode") LANGOPT(MicrosoftExt , 1, 0, "Microsoft C++ extensions") +LANGOPT(ASCIICharMode

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-31 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,40 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-31 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand requested changes to this pull request. https://github.com/llvm/llvm-project/pull/68926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-31 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/68926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Language to String function (PR #69487)

2023-10-26 Thread Ulrich Weigand via cfe-commits
uweigand wrote: This is intended to be used by the z/OS target, see the patch here: https://github.com/llvm/llvm-project/pull/68926 I asked Yusra to pull this part out into a separate PR. https://github.com/llvm/llvm-project/pull/69487 ___

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -1296,6 +1372,124 @@ void SystemZAsmPrinter::emitPPA1(MCSymbol *FnEndSym) { 4); } +void SystemZAsmPrinter::emitStartOfAsmFile(Module ) { + if (TM.getTargetTriple().isOSzOS()) +emitPPA2(M); + AsmPrinter::emitStartOfAsmFile(M); +}

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,24 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +int32_t ProductVersion,

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -1026,6 +1036,68 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("Product Major Version"))) +return

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -10,9 +10,49 @@ #include "clang/Config/config.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FormatVariadic.h" #include "llvm/TargetParser/Triple.h" using namespace clang; +const char

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -2267,6 +2268,14 @@ void Clang::AddSystemZTargetArgs(const ArgList , CmdArgs.push_back("-mfloat-abi"); CmdArgs.push_back("soft"); } + + if (Triple.isOSzOS()) { +CmdArgs.push_back("-mllvm"); +CmdArgs.push_back( +

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-16 Thread Ulrich Weigand via cfe-commits
@@ -976,6 +976,24 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +int32_t ProductVersion,

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-13 Thread Ulrich Weigand via cfe-commits
@@ -10,7 +10,7 @@ // .byte (i.e., the one for the 3) would, it seems, also match // the .byte line below for the 34. -// RUN: %clang_cc1 --target=s390x-ibm-zos -xc -S -o - %s | FileCheck %s --check-prefix CHECK-C +// RUN: %clang --target=s390x-ibm-zos -xc -S -o - %s

[clang] [clang][CodeGen] Use byval for SystemZ indirect arguments (PR #66404)

2023-09-14 Thread Ulrich Weigand via cfe-commits
uweigand wrote: This looks correct to me. I'm just wondering if there's any unexpected change of generated code due to this - did you do a comparison before/after of some larger code bases? https://github.com/llvm/llvm-project/pull/66404 ___

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #65407)

2023-09-07 Thread Ulrich Weigand via cfe-commits
uweigand wrote: SystemZ back-end changes LGTM.Additional reviews as to the Clang and time support changes would be appreciated. https://github.com/llvm/llvm-project/pull/65407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #65407)

2023-09-06 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/65407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] 24ec521 - [libunwind][SystemZ] Use process_vm_readv to avoid potential segfaults

2022-07-18 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2022-07-18T16:54:48+02:00 New Revision: 24ec521cd7bb51447f4ab03460d91c57378d49f7 URL: https://github.com/llvm/llvm-project/commit/24ec521cd7bb51447f4ab03460d91c57378d49f7 DIFF:

[libunwind] 7167237 - [libunwind][SystemZ] Unwind out of signal handlers

2022-05-04 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2022-05-04T10:43:11+02:00 New Revision: 71672375fe91d602699ae2a6d6a88e910ff91b5c URL: https://github.com/llvm/llvm-project/commit/71672375fe91d602699ae2a6d6a88e910ff91b5c DIFF:

[libunwind] 364c502 - [libunwind] Add SystemZ support

2022-05-02 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2022-05-02T14:35:29+02:00 New Revision: 364c5023d2ce1617c706b185892ddfaa2fd4d166 URL: https://github.com/llvm/llvm-project/commit/364c5023d2ce1617c706b185892ddfaa2fd4d166 DIFF:

[clang] 1283ccb - Support z16 processor name

2022-04-21 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2022-04-21T19:58:22+02:00 New Revision: 1283ccb610feef4f2e0edf22f66a705155a0e0c7 URL: https://github.com/llvm/llvm-project/commit/1283ccb610feef4f2e0edf22f66a705155a0e0c7 DIFF:

[clang] 7f00395 - [SystemZ] Implement __builtin_eh_return_data_regno

2020-07-24 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2020-07-24T10:28:06+02:00 New Revision: 7f003957bfcd1ed29ded176f04e3cdb55a0c0112 URL: https://github.com/llvm/llvm-project/commit/7f003957bfcd1ed29ded176f04e3cdb55a0c0112 DIFF:

[clang] 4c5a93b - [ABI] Handle C++20 [[no_unique_address]] attribute

2020-07-10 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2020-07-10T14:01:05+02:00 New Revision: 4c5a93bd58bad70e91ac525b0e020bd5119a321a URL: https://github.com/llvm/llvm-project/commit/4c5a93bd58bad70e91ac525b0e020bd5119a321a DIFF:

[clang] 80a1b95 - [SystemZ ABI] Allow class types in GetSingleElementType

2020-07-07 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2020-07-07T19:56:19+02:00 New Revision: 80a1b95b8e72674cef7efb39636dc73c248ae6f3 URL: https://github.com/llvm/llvm-project/commit/80a1b95b8e72674cef7efb39636dc73c248ae6f3 DIFF:

  1   2   >