@@ -306,15 +350,18 @@ SmallVector tokenize(StringRef Template) {
StringLiteral Open("{{");
StringLiteral Close("}}");
size_t Start = 0;
- size_t DelimiterStart = Template.find(Open);
+ // size_t DelimiterStart = Template.find(Open);
nikic wrote:
Leftov
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/160165
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic commented:
How much does this improve performance?
https://github.com/llvm/llvm-project/pull/160165
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-br
@@ -572,6 +620,8 @@ void ASTNode::render(const json::Value &CurrentCtx,
raw_ostream &OS) {
ParentContext = &CurrentCtx;
const json::Value *ContextPtr = Ty == Root ? ParentContext : findContext();
+ if (AccessorValue.empty() && (Ty != Root && Ty != Text))
+return;
---
@@ -17,6 +17,50 @@ namespace {
using Accessor = SmallVector;
+// A more generic specialized find for needles of length 1-3.
+[[maybe_unused]]
nikic wrote:
Not maybe_unused?
https://github.com/llvm/llvm-project/pull/160165
___
@@ -3248,9 +3346,11 @@ as follows:
this set are considered to support most general arithmetic operations
efficiently.
``ni:::...``
-This specifies pointer types with the specified address spaces
-as :ref:`Non-Integral Pointer Type ` s. The ``0``
-address sp
@@ -355,30 +364,111 @@ class DataLayout {
/// \sa DataLayout::getAddressSizeInBits
unsigned getAddressSize(unsigned AS) const { return getIndexSize(AS); }
- /// Return the address spaces containing non-integral pointers. Pointers in
- /// this address space don't have a
@@ -617,7 +638,7 @@ Error DataLayout::parseLayoutString(StringRef LayoutString)
{
// the spec for AS0, and we then update that to mark it non-integral.
const PointerSpec &PS = getPointerSpec(AS);
setPointerSpec(AS, PS.BitWidth, PS.ABIAlign, PS.PrefAlign,
PS.IndexB
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/105735
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -660,42 +660,136 @@ Non-Integral Pointer Type
Note: non-integral pointer types are a work in progress, and they should be
considered experimental at this time.
-LLVM IR optionally allows the frontend to denote pointers in certain address
-spaces as "non-integral" via the :r
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/105735
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/159959
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -3193,9 +3273,14 @@ as follows:
default index size is equal to the pointer size.
The index size also specifies the width of addresses in this address space.
All sizes are in bits.
-The address space, ``n``, is optional, and if not specified,
-denotes the
@@ -77,12 +77,21 @@ class DataLayout {
uint32_t BitWidth;
Align ABIAlign;
Align PrefAlign;
+/// The index bit width also defines the address size in this address
space.
+/// If the index width is less than the representation bit width, the
+/// pointer
@@ -440,8 +461,12 @@ Error DataLayout::parsePointerSpec(StringRef Spec) {
return createStringError(
"index size cannot be larger than the pointer size");
+ if (ExternalState && BitWidth == IndexBitWidth)
+return createStringError(
+"pointers with exter
@@ -660,42 +660,122 @@ Non-Integral Pointer Type
Note: non-integral pointer types are a work in progress, and they should be
considered experimental at this time.
-LLVM IR optionally allows the frontend to denote pointers in certain address
-spaces as "non-integral" via the :r
@@ -660,42 +660,122 @@ Non-Integral Pointer Type
Note: non-integral pointer types are a work in progress, and they should be
considered experimental at this time.
-LLVM IR optionally allows the frontend to denote pointers in certain address
-spaces as "non-integral" via the :r
@@ -660,42 +660,122 @@ Non-Integral Pointer Type
Note: non-integral pointer types are a work in progress, and they should be
considered experimental at this time.
-LLVM IR optionally allows the frontend to denote pointers in certain address
-spaces as "non-integral" via the :r
@@ -6,7 +6,9 @@ target datalayout = "p:16:16:16:8"
; The GEP should only modify the low 8 bits of the pointer.
define ptr @test() {
; CHECK-LABEL: define ptr @test() {
-; CHECK-NEXT:ret ptr inttoptr (i16 -256 to ptr)
+; We need to use finer-grained DataLayout properties for
https://github.com/nikic milestoned
https://github.com/llvm/llvm-project/pull/159209
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
The diff here is fairly large, but also very mechanical. This fixes a
regression for the Rust defmt crate with LLVM 21.
https://github.com/llvm/llvm-project/pull/159420
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.o
https://github.com/nikic created
https://github.com/llvm/llvm-project/pull/159420
None
>From 0dca43897ece415a59345b11dd86854d60a3a640 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Fri, 12 Sep 2025 09:11:08 +0200
Subject: [PATCH 1/2] [MC] Add parseSymbol() helper (NFC) (#158106)
This combi
https://github.com/nikic milestoned
https://github.com/llvm/llvm-project/pull/159420
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/158918
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/158013
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
Duplicate of https://github.com/llvm/llvm-project/pull/158402.
https://github.com/llvm/llvm-project/pull/158403
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-br
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/158403
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/158013
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/157810
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
TBH I don't think selects should be validated by profcheck at all, only
branches.
https://github.com/llvm/llvm-project/pull/157599
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
nikic wrote:
> This was merged to the release branch - the PR didn't update since I didn't
> have access to write to your repo @nikic (don't forget to check the "allow
> maintainer to write" checkbox in the future).
Huh, this is weird. I checked a few other PRs I have open, and they all have i
nikic wrote:
> > I don't know if I understand what you're going for in this patch. How is
> > this an improvement over just keeping REQUIRES: shell? The REQUIRES: bit
> > is what's going to stop the test from running in the wrong environment.
> > That seems like the right tradeoff.
>
> If we
https://github.com/nikic created
https://github.com/llvm/llvm-project/pull/157410
Backport of:
https://github.com/llvm/llvm-project/commit/a6148071300302b451ae92fbd8f8b955a6974891
https://github.com/llvm/llvm-project/commit/ec581e460ae92ef29c1ea4f200b36b79188fdd21
https://github.com/llvm/ll
https://github.com/nikic milestoned
https://github.com/llvm/llvm-project/pull/157410
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
As this test runs the whole optimization pipeline, please move it to
llvm/test/Transforms/PhaseOrdering.
https://github.com/llvm/llvm-project/pull/151649
___
llvm-branch-commits mailing list
llvm-branch-
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/151649
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/151649
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic milestoned
https://github.com/llvm/llvm-project/pull/156815
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -697,8 +697,7 @@ static bool isSafeAndProfitableToSinkLoad(LoadInst *L) {
Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) {
LoadInst *FirstLI = cast(PN.getIncomingValue(0));
- // Can't forward swifterror through a phi.
- if (FirstLI->getOperand(0)->isS
@@ -0,0 +1,167 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
UTC_ARGS: --check-globals all --version 5
+; RUN: opt -passes=pre-isel-intrinsic-lowering -S < %s | FileCheck
--check-prefix=NOPAUTH %s
+; RUN: opt -passes=pre-isel-intrinsic-lowering -m
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
return Changed;
}
+namespace {
+
+enum class PointerEncoding {
+ Rotate,
+ PACCopyable,
+ PACNonCopyable,
+};
+
+bool expandProtectedFieldPtr(Function &Intr) {
+ Module &M = *Intr.getParent();
+
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
return Changed;
}
+namespace {
+
+enum class PointerEncoding {
+ Rotate,
+ PACCopyable,
+ PACNonCopyable,
+};
nikic wrote:
Unused?
https://github.com/llvm/llvm-project/pull/151
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
return Changed;
}
+namespace {
+
+enum class PointerEncoding {
+ Rotate,
+ PACCopyable,
+ PACNonCopyable,
+};
+
+bool expandProtectedFieldPtr(Function &Intr) {
+ Module &M = *Intr.getParent();
+
@@ -2850,6 +2850,12 @@ def int_experimental_convergence_anchor
def int_experimental_convergence_loop
: DefaultAttrsIntrinsic<[llvm_token_ty], [], [IntrNoMem, IntrConvergent]>;
+//===- Structure Protection Intrinsics
===//
+
+def int_prote
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
return Changed;
}
+namespace {
+
+enum class PointerEncoding {
+ Rotate,
+ PACCopyable,
+ PACNonCopyable,
+};
+
+bool expandProtectedFieldPtr(Function &Intr) {
+ Module &M = *Intr.getParent();
+
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/155513
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -634,7 +634,7 @@ class ASTContext : public RefCountedBase {
/// contain data that is address discriminated. This includes
/// implicitly authenticated values like vtable pointers, as well as
/// explicitly qualified fields.
- bool containsAddressDiscriminatedPointerAu
@@ -634,7 +634,7 @@ class ASTContext : public RefCountedBase {
/// contain data that is address discriminated. This includes
/// implicitly authenticated values like vtable pointers, as well as
/// explicitly qualified fields.
- bool containsAddressDiscriminatedPointerAu
@@ -553,16 +553,17 @@ void Instruction::dropUBImplyingAttrsAndUnknownMetadata(
}
void Instruction::dropUBImplyingAttrsAndMetadata(ArrayRef Keep) {
nikic wrote:
I think the `Keep` is no longer needed now, but I guess it doesn't hurt to keep
it...
https://git
@@ -1,20 +1,21 @@
-; NOTE: Assertions have been autogenerated by update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
UTC_ARGS: --check-globals all --version 5
nikic wrote:
I think you don't need the `--check-globals`,
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/154635
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/154635
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -498,6 +498,7 @@ LLVM_ABI void dropDebugUsers(Instruction &I);
///
/// The moved instructions receive the insertion point debug location values
/// (DILocations) and their debug intrinsic instructions are removed.
+/// Selects and indirect calls keep their MD_prof metadata.
https://github.com/nikic requested changes to this pull request.
We need to also either backport a fix for lldb tests or disable the relevant
tests. That needs to happen as part of this PR.
https://github.com/llvm/llvm-project/pull/155251
___
llvm-bra
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/139423
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
You can probably achieve that just by adding a function call before the select
(where the function is not known willreturn/nounwind).
https://github.com/llvm/llvm-project/pull/152420
___
llvm-branch-comm
@@ -1678,6 +1680,8 @@ void
Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) {
// A DIAssignID attachment is debug metadata, don't drop it.
KnownSet.insert(LLVMContext::MD_DIAssignID);
+ if (!ProfcheckDisableMetadataFixes)
+KnownSet.insert(LLVMContext::MD_p
nikic wrote:
All this tests needs is a hoistable select with prof metadata. You do not need
any of the blockaddress / indirectbr stuff.
https://github.com/llvm/llvm-project/pull/152420
___
llvm-branch-commits mailing
@@ -1678,6 +1680,8 @@ void
Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) {
// A DIAssignID attachment is debug metadata, don't drop it.
KnownSet.insert(LLVMContext::MD_DIAssignID);
+ if (!ProfcheckDisableMetadataFixes)
+KnownSet.insert(LLVMContext::MD_p
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/152221
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
Closing this as LLVM 20 no longer accepts backports.
https://github.com/llvm/llvm-project/pull/148878
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/148878
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
Closing this as LLVM 20 no longer accepts backports.
https://github.com/llvm/llvm-project/pull/147554
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/147554
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
Closing this as LLVM 20 no longer accepts backports.
https://github.com/llvm/llvm-project/pull/147448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/147448
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/142909
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
Closing this as LLVM 20 no longer accepts backports.
https://github.com/llvm/llvm-project/pull/142909
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
nikic wrote:
Closing this as LLVM 20 no longer accepts backports.
https://github.com/llvm/llvm-project/pull/137605
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/137605
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
Closing this as LLVM 20 no longer accepts backports.
https://github.com/llvm/llvm-project/pull/136863
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/136863
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
Closing this as LLVM 20 no longer accepts backports.
https://github.com/llvm/llvm-project/pull/133223
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/133223
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/nikic requested changes to this pull request.
This is absolutely inappropriate to land on the release branch.
Feel free to update the version numbers -- or better, remove the mention of
specific versions entirely. These will get removed when we are ready to remove
them, not
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/152364
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -3490,19 +3514,25 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst
&I) {
// Update successor info.
addSuccessorWithProb(CallBrMBB, Return, BranchProbability::getOne());
- for (unsigned i = 0, e = I.getNumIndirectDests(); i < e; ++i) {
-BasicBlock *Dest =
@@ -9674,7 +9678,7 @@ This instruction requires several arguments:
indicates the function accepts a variable number of arguments, the
extra arguments can be specified.
#. '``fallthrough label``': the label reached when the inline assembly's
- execution exits the bottom.
nikic wrote:
I think it would be a good idea to land the refactorings here (which just split
things into separate methods) as a separate NFC change. It's kind of hard to
follow what's going on here with all the code movements mixed in.
https://github.com/llvm
@@ -3006,10 +3024,41 @@ bool IRTranslator::translateInvoke(const User &U,
return true;
}
+/// The intrinsics currently supported by callbr are implicit control flow
+/// intrinsics such as amdgcn.kill.
bool IRTranslator::translateCallBr(const User &U,
@@ -359,6 +359,11 @@ UseCaptureInfo llvm::DetermineUseCaptureKind(const Use &U,
const Value *Base) {
case Instruction::AddrSpaceCast:
// The original value is not captured via this if the new value isn't.
return UseCaptureInfo::passthrough();
+ case Instruction::Ptr
nikic wrote:
Should also add an entry in
https://llvm.org/docs/LangRef.html#constant-expressions.
https://github.com/llvm/llvm-project/pull/139357
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.o
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/139357
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -12521,6 +12521,59 @@ Example:
%Y = ptrtoint ptr %P to i64; yields zero
extension on 32-bit architecture
%Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension
for a vector of addresses on 32-bit architecture
+.. _i_ptrto
@@ -3532,6 +3533,28 @@ void Verifier::visitFPToSIInst(FPToSIInst &I) {
visitInstruction(I);
}
+void Verifier::visitPtrToAddrInst(PtrToAddrInst &I) {
+ // Get the source and destination types
+ Type *SrcTy = I.getOperand(0)->getType();
+ Type *DestTy = I.getType();
+
+ Ch
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/139357
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -731,6 +731,12 @@ class TargetTransformInfoImplBase {
return 0;
break;
}
+case Instruction::PtrToAddr: {
+ unsigned DstSize = Dst->getScalarSizeInBits();
+ if (DL.isLegalInteger(DstSize) && DstSize >=
DL.getAddressSizeInBits(Src))
---
@@ -12521,6 +12521,59 @@ Example:
%Y = ptrtoint ptr %P to i64; yields zero
extension on 32-bit architecture
%Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension
for a vector of addresses on 32-bit architecture
+.. _i_ptrto
@@ -3532,6 +3533,28 @@ void Verifier::visitFPToSIInst(FPToSIInst &I) {
visitInstruction(I);
}
+void Verifier::visitPtrToAddrInst(PtrToAddrInst &I) {
+ // Get the source and destination types
+ Type *SrcTy = I.getOperand(0)->getType();
+ Type *DestTy = I.getType();
+
+ Ch
@@ -1482,6 +1482,20 @@ Constant *llvm::ConstantFoldCastOperand(unsigned Opcode,
Constant *C,
switch (Opcode) {
default:
llvm_unreachable("Missing case");
+ case Instruction::PtrToAddr:
+if (auto *GEP = dyn_cast(C)) {
+ // For now just handle the basic case of
@@ -12521,6 +12521,59 @@ Example:
%Y = ptrtoint ptr %P to i64; yields zero
extension on 32-bit architecture
%Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension
for a vector of addresses on 32-bit architecture
+.. _i_ptrto
https://github.com/nikic approved this pull request.
LGTM, though I wouldn't expect to see much usub.with.overflow in the middle-end.
https://github.com/llvm/llvm-project/pull/135785
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.o
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/152099
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
That sounds fine as long as the plan is to remove the isNonIntegralPointer()
method in the future, in favor of more precise checks.
https://github.com/llvm/llvm-project/pull/105735
___
llvm-branch-commits mailing list
llvm-branch-commits@
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/148782
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
nikic wrote:
This looks like a simple missed optimization in InstCombine.
My first thought would be to handle this via foldOpIntoPhi for selects:
https://github.com/nikic/llvm-project/commit/c7d9b006453275be94894c6afdae5f6c940c1621
But this isn't quite correc
nikic wrote:
Ah, I didn't realize that it's always based on op_end.
Maybe this change is not actually that bad if combined with the new
successors() representation? Then the successors iterator is not going to
through through getSuccessor() anymore and it will have less impact?
https://github
https://github.com/nikic approved this pull request.
LGTM, though I'd probably squash the first two commits. The back and forth is
confusing.
https://github.com/llvm/llvm-project/pull/150425
___
llvm-branch-commits mailing list
llvm-branch-commits@lis
@@ -461,6 +465,198 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(
return Changed;
}
+namespace {
+
+enum class PointerEncoding {
+ Rotate,
+ PACCopyable,
+ PACNonCopyable,
+};
+
+bool expandProtectedFieldPtr(Function &Intr) {
+ Module &M = *Intr.getParent();
+
nikic wrote:
Use update_test_checks.py.
https://github.com/llvm/llvm-project/pull/151647
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bra
1 - 100 of 684 matches
Mail list logo