[llvm-branch-commits] [RISCV][MC] Warn if SEW/LMUL may not be compatible (PR #94313)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Pengcheng Wang (wangpc-pp) Changes According to RVV spec: > In general, the requirement is to support LMUL ≥ SEWMIN/ELEN, > where SEWMIN is the narrowest supported SEW value and ELEN is > the widest supported SEW value. > > For a given support

[llvm-branch-commits] [RISCV][MC] Warn if SEW/LMUL may not be compatible (PR #94313)

2024-06-03 Thread Pengcheng Wang via llvm-branch-commits
https://github.com/wangpc-pp created https://github.com/llvm/llvm-project/pull/94313 According to RVV spec: > In general, the requirement is to support LMUL ≥ SEWMIN/ELEN, > where SEWMIN is the narrowest supported SEW value and ELEN is > the widest supported SEW value. > > For a given supported

[llvm-branch-commits] [llvm] Bump version to 18.1.7 (PR #93723)

2024-06-03 Thread Tom Stellard via llvm-branch-commits
https://github.com/tstellar closed https://github.com/llvm/llvm-project/pull/93723 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] 1ce2d26 - Bump version to 18.1.7 (#93723)

2024-06-03 Thread via llvm-branch-commits
Author: Tom Stellard Date: 2024-06-03T17:50:36-07:00 New Revision: 1ce2d26cd2e912bb168e78ccc049b70a81dab03a URL: https://github.com/llvm/llvm-project/commit/1ce2d26cd2e912bb168e78ccc049b70a81dab03a DIFF: https://github.com/llvm/llvm-project/commit/1ce2d26cd2e912bb168e78ccc049b70a81dab03a.diff

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
@@ -557,6 +557,36 @@ ! V9: prefetch [%i1+%i2], #one_read ! encoding: [0xc3,0x6e,0x40,0x1a] prefetch [ %i1 + %i2 ], #one_read +! V8: error: malformed ASI tag, must be a constant integer expression s-barannikov wrote: With the a

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
@@ -557,6 +557,36 @@ ! V9: prefetch [%i1+%i2], #one_read ! encoding: [0xc3,0x6e,0x40,0x1a] prefetch [ %i1 + %i2 ], #one_read +! V8: error: malformed ASI tag, must be a constant integer expression s-barannikov wrote: It is beca

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread via llvm-branch-commits
@@ -557,6 +557,36 @@ ! V9: prefetch [%i1+%i2], #one_read ! encoding: [0xc3,0x6e,0x40,0x1a] prefetch [ %i1 + %i2 ], #one_read +! V8: error: malformed ASI tag, must be a constant integer expression koachan wrote: Changing them t

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
@@ -1088,6 +1115,34 @@ ParseStatus SparcAsmParser::parseASITag(OperandVector &Operands) { return ParseStatus::Success; } +ParseStatus SparcAsmParser::parsePrefetchTag(OperandVector &Operands) { + SMLoc S = Parser.getTok().getLoc(); + SMLoc E = Parser.getTok().getEndLoc();

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Eli Friedman via llvm-branch-commits
@@ -354,6 +354,23 @@ Given that ``signedPointer`` matches the layout for signed pointers signed with the given key, extract the raw pointer from it. This operation does not trap and cannot fail, even if the pointer is not validly signed. +``ptrauth_sign_constant`` +^

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread via llvm-branch-commits
@@ -1088,6 +1115,34 @@ ParseStatus SparcAsmParser::parseASITag(OperandVector &Operands) { return ParseStatus::Success; } +ParseStatus SparcAsmParser::parsePrefetchTag(OperandVector &Operands) { + SMLoc S = Parser.getTok().getLoc(); + SMLoc E = Parser.getTok().getEndLoc();

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Ahmed Bougacha via llvm-branch-commits
@@ -2126,14 +2219,16 @@ static ExprResult PointerAuthSignGenericData(Sema &S, CallExpr *Call) { } static ExprResult PointerAuthSignOrAuth(Sema &S, CallExpr *Call, -PointerAuthOpKind OpKind) { +Poi

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Ahmed Bougacha via llvm-branch-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/93904 >From 1a23a99f23714ba6a83b354e3b9afd056b263a02 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Thu, 30 May 2024 17:33:04 -0700 Subject: [PATCH 1/3] [clang] Define ptrauth_sign_constant builtin. This is

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Ahmed Bougacha via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { ahmedbougacha wrote: Clang originally had different conventions; it us

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Ahmed Bougacha via llvm-branch-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/93903 >From 61be7a922397d66773a8f4a6e476ea321f52f00c Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Thu, 30 May 2024 17:22:29 -0700 Subject: [PATCH 1/4] [clang] Define ptrauth_string_discriminator builtin.

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Ahmed Bougacha via llvm-branch-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/93903 >From 61be7a922397d66773a8f4a6e476ea321f52f00c Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Thu, 30 May 2024 17:22:29 -0700 Subject: [PATCH 1/3] [clang] Define ptrauth_string_discriminator builtin.

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Ahmed Bougacha via llvm-branch-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/93904 >From 1a23a99f23714ba6a83b354e3b9afd056b263a02 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Thu, 30 May 2024 17:33:04 -0700 Subject: [PATCH 1/2] [clang] Define ptrauth_sign_constant builtin. This is

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Ahmed Bougacha via llvm-branch-commits
https://github.com/ahmedbougacha updated https://github.com/llvm/llvm-project/pull/93903 >From 61be7a922397d66773a8f4a6e476ea321f52f00c Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Thu, 30 May 2024 17:22:29 -0700 Subject: [PATCH 1/2] [clang] Define ptrauth_string_discriminator builtin.

[llvm-branch-commits] [SPARC][IAS] Handle the case of non-4-byte aligned writeNopData (PR #94251)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/94251 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
kovdan01 wrote: It would be nice to also add a run line against `aarch64` or `aarch64-elf` generic triple in this and other tests (see code below). The logic tested is not apple-specific. The test would need a slight change since IR for ELF has functions mark

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
@@ -557,6 +557,36 @@ ! V9: prefetch [%i1+%i2], #one_read ! encoding: [0xc3,0x6e,0x40,0x1a] prefetch [ %i1 + %i2 ], #one_read +! V8: error: malformed ASI tag, must be a constant integer expression s-barannikov wrote: The error

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 requested changes to this pull request. The changes themself in terms of functionality look OK to me - but I want someone else with deeper understanding of the context to take a look before this gets merged. https://github.com/llvm/llvm-project/pull/93903 __

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/93903 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -12583,6 +12584,12 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, case Builtin::BI__builtin_expect_with_probability: return Visit(E->getArg(0)); + case Builtin::BI__builtin_ptrauth_string_discriminator: { +auto literal = cast(E->getArg(0)->Ign

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { kovdan01 wrote: Naming style of variables all over the function (use `P

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -12583,6 +12584,12 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, case Builtin::BI__builtin_expect_with_probability: return Visit(E->getArg(0)); + case Builtin::BI__builtin_ptrauth_string_discriminator: { +auto literal = cast(E->getArg(0)->Ign

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
@@ -1088,6 +1115,34 @@ ParseStatus SparcAsmParser::parseASITag(OperandVector &Operands) { return ParseStatus::Success; } +ParseStatus SparcAsmParser::parsePrefetchTag(OperandVector &Operands) { + SMLoc S = Parser.getTok().getLoc(); + SMLoc E = Parser.getTok().getEndLoc();

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2126,14 +2219,16 @@ static ExprResult PointerAuthSignGenericData(Sema &S, CallExpr *Call) { } static ExprResult PointerAuthSignOrAuth(Sema &S, CallExpr *Call, -PointerAuthOpKind OpKind) { +Poi

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); asl wrote:

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { asl wrote: ```suggestion static ExprResult PointerAuthStringDiscriminat

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -2156,6 +2156,24 @@ static ExprResult PointerAuthAuthAndResign(Sema &S, CallExpr *Call) { return Call; } +static ExprResult PointerAuthStringDiscriminator(Sema &S, CallExpr *call) { + if (checkPointerAuthEnabled(S, call)) return ExprError(); + + // We've already perfor

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl commented: See mostly code style nits above https://github.com/llvm/llvm-project/pull/93903 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/93903 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
@@ -537,16 +537,26 @@ ! V9: stxa %g0, [%g2+%i5] #ASI_SNF ! encoding: [0xc0,0xf0,0x90,0x7d] stxa %g0, [%g2 + %i5] #ASI_SNF -! V8: error: instruction requires a CPU feature not currently enabled +! V8: error: invalid operand for instr

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
https://github.com/s-barannikov commented: Please add testcases for the remaining tags https://github.com/llvm/llvm-project/pull/94249 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
https://github.com/s-barannikov edited https://github.com/llvm/llvm-project/pull/94249 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s kovdan01 wrote: > @kovdan01 If you're having a RUN line locally, can you just suggest a change > here? Updated the comment, thanks https://git

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [SPARC][IAS] Add aliases for %asr20-21 as defined in JPS1 (PR #94247)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/94247 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s asl wrote: @kovdan01 If you're having a RUN line locally, can you just suggest a change here? https://github.com/llvm/llvm-project/pull/93904 _

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [SPARC][IAS] Add support for %uhi and %ulo extensions (PR #94246)

2024-06-03 Thread Sergei Barannikov via llvm-branch-commits
https://github.com/s-barannikov approved this pull request. https://github.com/llvm/llvm-project/pull/94246 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2061,6 +2071,58 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { } } +ConstantLValue +ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) { + auto unsignedPointer = emitPointerAuthPointer(E->getArg(0)); + auto key = emitPointerAuthKey(E->g

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-intrinsics -emit-llvm %s -o - | FileCheck %s kovdan01 wrote: It would be nice to also add a run line against `aarch64` or `aarch64-elf` generic triple in this and other tests. The logic tes

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 requested changes to this pull request. The changes themself in terms of functionality look OK to me - but I want someone else with deeper understanding of the context to take a look before this gets merged. In terms of style, here are some of the categories of mino

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2030,8 +2030,26 @@ bool Sema::checkConstantPointerAuthKey(Expr *Arg, unsigned &Result) { return false; } +static std::pair +findConstantBaseAndOffset(Sema &S, Expr *E) { kovdan01 wrote: Naming style of variables https://github.com/llvm/llvm-project/pu

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -0,0 +1,77 @@ +//===--- CGPointerAuth.cpp - IR generation for pointer authentication -===// +// +// 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: Apa

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2061,6 +2071,58 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { } } +ConstantLValue +ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) { + auto unsignedPointer = emitPointerAuthPointer(E->getArg(0)); + auto key = emitPointerAuthKey(E->g

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -0,0 +1,77 @@ +//===--- CGPointerAuth.cpp - IR generation for pointer authentication -===// +// +// 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: Apa

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2061,6 +2071,58 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { } } +ConstantLValue +ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) { + auto unsignedPointer = emitPointerAuthPointer(E->getArg(0)); + auto key = emitPointerAuthKey(E->g

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2061,6 +2071,58 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { } } +ConstantLValue +ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) { + auto unsignedPointer = emitPointerAuthPointer(E->getArg(0)); kovdan01 wrote: For

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2074,16 +2092,91 @@ static bool checkPointerAuthValue(Sema &S, Expr *&Arg, if (convertArgumentToType(S, Arg, ExpectedTy)) return true; - // Warn about null pointers for non-generic sign and auth operations. - if ((OpKind == PAO_Sign || OpKind == PAO_Auth) && -

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2030,8 +2030,26 @@ bool Sema::checkConstantPointerAuthKey(Expr *Arg, unsigned &Result) { return false; } +static std::pair +findConstantBaseAndOffset(Sema &S, Expr *E) { + // Must evaluate as a pointer. + Expr::EvalResult result; + if (!E->EvaluateAsRValue(result, S.

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
https://github.com/kovdan01 edited https://github.com/llvm/llvm-project/pull/93904 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -2061,6 +2071,58 @@ ConstantLValueEmitter::VisitCallExpr(const CallExpr *E) { } } +ConstantLValue +ConstantLValueEmitter::emitPointerAuthSignConstant(const CallExpr *E) { kovdan01 wrote: Names to fix: `unsignedPointer`, `key`, `storageAddress`, `otherDis

[llvm-branch-commits] [clang] [clang] Define ptrauth_sign_constant builtin. (PR #93904)

2024-06-03 Thread Daniil Kovalev via llvm-branch-commits
@@ -938,6 +938,11 @@ class CodeGenModule : public CodeGenTypeCache { // Return the function body address of the given function. llvm::Constant *GetFunctionStart(const ValueDecl *Decl); + llvm::Constant *getConstantSignedPointer(llvm::Constant *pointer, ko

[llvm-branch-commits] [clang] [clang] Implement pointer authentication for C++ virtual functions, v-tables, and VTTs (PR #94056)

2024-06-03 Thread Anton Korobeynikov via llvm-branch-commits
@@ -1261,6 +1262,10 @@ class ASTContext : public RefCountedBase { /// space. QualType removeAddrSpaceQualType(QualType T) const; + /// Return the "other" type-specific discriminator for the given type. asl wrote: The comment here looks a bit misleading w

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Ahmed Bougacha (ahmedbougacha) Changes The functions are currently always signed/authenticated with zero discriminator. Co-Authored-By: John McCall --- Patch is 37.62 KiB, truncated to 20.00 KiB below, full ver

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Ahmed Bougacha (ahmedbougacha) Changes The functions are currently always signed/authenticated with zero discriminator. Co-Authored-By: John McCall --- Patch is 37.62 KiB, truncated to 20.00 KiB below, full v

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-03 Thread Akira Hatanaka via llvm-branch-commits
https://github.com/ahatanak ready_for_review https://github.com/llvm/llvm-project/pull/93906 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-03 Thread Akira Hatanaka via llvm-branch-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/93906 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement function pointer signing and authenticated function calls (PR #93906)

2024-06-03 Thread Akira Hatanaka via llvm-branch-commits
https://github.com/ahatanak edited https://github.com/llvm/llvm-project/pull/93906 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang] Implement function pointer signing. (PR #93906)

2024-06-03 Thread Akira Hatanaka via llvm-branch-commits
https://github.com/ahatanak updated https://github.com/llvm/llvm-project/pull/93906 >From 0e85001f6d53e63beca77a76eaba1875ec84000d Mon Sep 17 00:00:00 2001 From: Akira Hatanaka Date: Fri, 24 May 2024 20:23:36 -0700 Subject: [PATCH 1/2] [clang] Implement function pointer signing. Co-Authored-By

[llvm-branch-commits] [clang] [clang][test] remove unused `run` overload in `BoundNodesCallback` (PR #94244)

2024-06-03 Thread Julian Schmidt via llvm-branch-commits
https://github.com/5chmidti updated https://github.com/llvm/llvm-project/pull/94244 >From 615f30ba7db2bb13d20b4c2a8c0d405a8419ecae Mon Sep 17 00:00:00 2001 From: Julian Schmidt Date: Sat, 1 Jun 2024 17:49:13 +0200 Subject: [PATCH] [clang][test] remove unused `run` overload in `BoundNodesCallba

[llvm-branch-commits] [clang] [clang][test] add testing for the AST matcher reference (PR #94248)

2024-06-03 Thread Julian Schmidt via llvm-branch-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/94248 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang][test] add testing for the AST matcher reference (PR #94248)

2024-06-03 Thread Julian Schmidt via llvm-branch-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/94248 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang][test] add testing for the AST matcher reference (PR #94248)

2024-06-03 Thread Julian Schmidt via llvm-branch-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/94248 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [SPARC][IAS] Add movr(n)e alias for movr(n)z (PR #94252)

2024-06-03 Thread via llvm-branch-commits
koachan wrote: Note: this PR was created by `spr`, please do not hand-merge this. https://github.com/llvm/llvm-project/pull/94252 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [SPARC][IAS] Handle the case of non-4-byte aligned writeNopData (PR #94251)

2024-06-03 Thread via llvm-branch-commits
koachan wrote: Note: this PR was created by `spr`, please do not hand-merge this. https://github.com/llvm/llvm-project/pull/94251 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread via llvm-branch-commits
koachan wrote: Note: this PR was created by `spr`, please do not hand-merge this. https://github.com/llvm/llvm-project/pull/94250 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread via llvm-branch-commits
koachan wrote: Note: this PR was created by `spr`, please do not hand-merge this. https://github.com/llvm/llvm-project/pull/94249 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [SPARC][IAS] Add aliases for %asr20-21 as defined in JPS1 (PR #94247)

2024-06-03 Thread via llvm-branch-commits
koachan wrote: Note: this PR was created by `spr`, please do not hand-merge this. https://github.com/llvm/llvm-project/pull/94247 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [SPARC][IAS] Add support for %uhi and %ulo extensions (PR #94246)

2024-06-03 Thread via llvm-branch-commits
koachan wrote: Note: this PR was created by `spr`, please do not hand-merge this. https://github.com/llvm/llvm-project/pull/94246 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [clang] [clang][test] add testing for the AST matcher reference (PR #94248)

2024-06-03 Thread Julian Schmidt via llvm-branch-commits
5chmidti wrote: CC @llvm/pr-subscribers-clang-tidy as stake-holders in matchers https://github.com/llvm/llvm-project/pull/94248 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm

[llvm-branch-commits] [SPARC][IAS] Handle the case of non-4-byte aligned writeNopData (PR #94251)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-sparc Author: Koakuma (koachan) Changes If the Count passed into writeNopData is not a multiple of four, add a little amount of zeros before writing the NOP stream. This makes it match the behavior of GNU binutils. --- Full diff: https://github

[llvm-branch-commits] [SPARC][IAS] Add movr(n)e alias for movr(n)z (PR #94252)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Koakuma (koachan) Changes This adds the alternate mnemonics for movrz and movrnz. --- Full diff: https://github.com/llvm/llvm-project/pull/94252.diff 2 Files Affected: - (modified) llvm/lib/Target/Sparc/SparcInstrAliases.td (+2) - (modif

[llvm-branch-commits] [SPARC][IAS] Add movr(n)e alias for movr(n)z (PR #94252)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-sparc Author: Koakuma (koachan) Changes This adds the alternate mnemonics for movrz and movrnz. --- Full diff: https://github.com/llvm/llvm-project/pull/94252.diff 2 Files Affected: - (modified) llvm/lib/Target/Sparc/SparcInstrAliases.td (+2

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Koakuma (koachan) Changes This adds support for `prefetcha` instruction for prefetching from alternate address spaces. --- Full diff: https://github.com/llvm/llvm-project/pull/94250.diff 3 Files Affected: - (modified) llvm/lib/Target/Spar

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-sparc Author: Koakuma (koachan) Changes This adds support for `prefetcha` instruction for prefetching from alternate address spaces. --- Full diff: https://github.com/llvm/llvm-project/pull/94250.diff 3 Files Affected: - (modified) llvm/lib/

[llvm-branch-commits] [SPARC][IAS] Add movr(n)e alias for movr(n)z (PR #94252)

2024-06-03 Thread via llvm-branch-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/94252 This adds the alternate mnemonics for movrz and movrnz. ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-sparc Author: Koakuma (koachan) Changes This adds named tag constants (such as `#one_write` and `#one_read`) for the prefetch instruction. --- Full diff: https://github.com/llvm/llvm-project/pull/94249.diff 11 Files Affected: - (modified) ll

[llvm-branch-commits] [clang] [clang][test] add testing for the AST matcher reference (PR #94248)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Julian Schmidt (5chmidti) Changes Previously, the examples in the AST matcher reference, which gets generated by the doxygen comments in `ASTMatchers.h`, were untested and best effort. Some of the matchers had no or wrong examples of how t

[llvm-branch-commits] [SPARC][IAS] Add aliases for %asr20-21 as defined in JPS1 (PR #94247)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-backend-sparc Author: Koakuma (koachan) Changes This adds %set_softint and %clear_softint alias for %asr20 and %asr21 as defined in JPS1. --- Full diff: https://github.com/llvm/llvm-project/pull/94247.diff 2 Files Affected: -

[llvm-branch-commits] [SPARC][IAS] Handle the case of non-4-byte aligned writeNopData (PR #94251)

2024-06-03 Thread via llvm-branch-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/94251 If the Count passed into writeNopData is not a multiple of four, add a little amount of zeros before writing the NOP stream. This makes it match the behavior of GNU binutils. ___

[llvm-branch-commits] [SPARC][IAS] Add support for `prefetcha` instruction (PR #94250)

2024-06-03 Thread via llvm-branch-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/94250 This adds support for `prefetcha` instruction for prefetching from alternate address spaces. ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org h

[llvm-branch-commits] [SPARC][IAS] Add support for %uhi and %ulo extensions (PR #94246)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-sparc Author: Koakuma (koachan) Changes This adds support for GNU %uhi and %ulo extensions. Those resolve to the same relocations as %hh and %hm. --- Full diff: https://github.com/llvm/llvm-project/pull/94246.diff 2 Files Affected: - (modifi

[llvm-branch-commits] [SPARC][IAS] Add named prefetch tag constants (PR #94249)

2024-06-03 Thread via llvm-branch-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/94249 This adds named tag constants (such as `#one_write` and `#one_read`) for the prefetch instruction. ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm

[llvm-branch-commits] [SPARC][IAS] Add aliases for %asr20-21 as defined in JPS1 (PR #94247)

2024-06-03 Thread via llvm-branch-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/94247 This adds %set_softint and %clear_softint alias for %asr20 and %asr21 as defined in JPS1. ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org http

[llvm-branch-commits] [SPARC][IAS] Add support for %uhi and %ulo extensions (PR #94246)

2024-06-03 Thread via llvm-branch-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/94246 This adds support for GNU %uhi and %ulo extensions. Those resolve to the same relocations as %hh and %hm. ___ llvm-branch-commits mailing list llvm-branch-commits@lis

[llvm-branch-commits] [clang] [clang][test] remove unused `run` overload in `BoundNodesCallback` (PR #94244)

2024-06-03 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Julian Schmidt (5chmidti) Changes The overload that did not take the additional `ASTContext *` argument is unnecessary when the context could simply be commented out, as it is always passed to `run` from `VerifyMatcher::run`. This patch r

[llvm-branch-commits] [clang] [clang][test] remove unused `run` overload in `BoundNodesCallback` (PR #94244)

2024-06-03 Thread Julian Schmidt via llvm-branch-commits
https://github.com/5chmidti created https://github.com/llvm/llvm-project/pull/94244 The overload that did not take the additional `ASTContext *` argument is unnecessary when the context could simply be commented out, as it is always passed to `run` from `VerifyMatcher::run`. This patch removes

[llvm-branch-commits] [clang] [Serialization] No transitive identifier change (PR #92085)

2024-06-03 Thread Chuanqi Xu via llvm-branch-commits
ChuanqiXu9 wrote: @jansvoboda11 ping. Did my answers resolve your concerns? https://github.com/llvm/llvm-project/pull/92085 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bra

  1   2   >