Author: Nikita Popov
Date: 2020-06-15T09:30:35+02:00
New Revision: 7cac7e0cfc72c865bfe42cc5c068e17218e600d5
URL:
https://github.com/llvm/llvm-project/commit/7cac7e0cfc72c865bfe42cc5c068e17218e600d5
DIFF:
https://github.com/llvm/llvm-project/commit/7cac7e0cfc72c865bfe42cc5c068e17218e600d5.diff
Author: Nikita Popov
Date: 2020-04-30T23:42:38+02:00
New Revision: afc287e0abec710398465ee1f86237513f2b5091
URL:
https://github.com/llvm/llvm-project/commit/afc287e0abec710398465ee1f86237513f2b5091
DIFF:
https://github.com/llvm/llvm-project/commit/afc287e0abec710398465ee1f86237513f2b5091.diff
Author: Nikita Popov
Date: 2020-08-01T23:47:46+02:00
New Revision: 25af353b0e74907d5d50c8616b885bd1f73a68b3
URL:
https://github.com/llvm/llvm-project/commit/25af353b0e74907d5d50c8616b885bd1f73a68b3
DIFF:
https://github.com/llvm/llvm-project/commit/25af353b0e74907d5d50c8616b885bd1f73a68b3.diff
Author: Nikita Popov
Date: 2020-05-15T19:41:07+02:00
New Revision: f89f7da999f362e4213c69923328dd1033276e59
URL:
https://github.com/llvm/llvm-project/commit/f89f7da999f362e4213c69923328dd1033276e59
DIFF:
https://github.com/llvm/llvm-project/commit/f89f7da999f362e4213c69923328dd1033276e59.diff
Author: Nikita Popov
Date: 2022-08-29T11:09:25+02:00
New Revision: c04eab8c78e517210c7641551ec008b09bfe20d0
URL:
https://github.com/llvm/llvm-project/commit/c04eab8c78e517210c7641551ec008b09bfe20d0
DIFF:
https://github.com/llvm/llvm-project/commit/c04eab8c78e517210c7641551ec008b09bfe20d0.diff
Author: Nikita Popov
Date: 2022-08-31T11:10:24+02:00
New Revision: a11e2d7366a11385e23d142ac93065a861b70a16
URL:
https://github.com/llvm/llvm-project/commit/a11e2d7366a11385e23d142ac93065a861b70a16
DIFF:
https://github.com/llvm/llvm-project/commit/a11e2d7366a11385e23d142ac93065a861b70a16.diff
Author: Nikita Popov
Date: 2022-09-06T09:44:45+02:00
New Revision: 71797797f7a759245cb39b93307e0641c511170c
URL:
https://github.com/llvm/llvm-project/commit/71797797f7a759245cb39b93307e0641c511170c
DIFF:
https://github.com/llvm/llvm-project/commit/71797797f7a759245cb39b93307e0641c511170c.diff
Author: Nikita Popov
Date: 2022-09-07T11:27:25+02:00
New Revision: 98a3a340c3612c06c51d7bb36bfc5857ab06a951
URL:
https://github.com/llvm/llvm-project/commit/98a3a340c3612c06c51d7bb36bfc5857ab06a951
DIFF:
https://github.com/llvm/llvm-project/commit/98a3a340c3612c06c51d7bb36bfc5857ab06a951.diff
Author: Nikita Popov
Date: 2022-09-08T09:45:50+02:00
New Revision: fd2475049e882e6c70a745cbe0799749ba184910
URL:
https://github.com/llvm/llvm-project/commit/fd2475049e882e6c70a745cbe0799749ba184910
DIFF:
https://github.com/llvm/llvm-project/commit/fd2475049e882e6c70a745cbe0799749ba184910.diff
nikic wrote:
You also need to replace uses in polly.
https://github.com/llvm/llvm-project/pull/71029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -334,6 +335,15 @@ template<> struct simplify_type {
}
};
+template <> struct GraphTraits {
nikic wrote:
> What's the issue with putting this here? Seems nicer than inlining yet
> another DFS in another place.
I have a couple of concerns about exposing
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/71534
>From e965141dc8e0be4dceb3e302ea91761203015c72 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Mon, 6 Nov 2023 17:28:11 +0100
Subject: [PATCH] [InstCombine] Infer zext nneg flag
Use KnownBits to infer the nneg fl
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/71534
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5587,11 +5587,20 @@ Instruction
*InstCombinerImpl::foldICmpWithZextOrSext(ICmpInst &ICmp) {
return new ICmpInst(ICmp.getPredicate(), Builder.CreateOr(X, Y),
Constant::getNullValue(X->getType()));
+ // Treat "zext nneg" as "sext"
+
@@ -0,0 +1,126 @@
+; RUN: opt < %s --O3 -S | FileCheck %s
+
+define signext i16 @vecreduce_smax_v2i16(i32 noundef %0, ptr noundef %1) #0 {
nikic wrote:
I think the point of these tests is to check interaction between IPSCCP and
InstCombine, so a PhaseOrdering te
@@ -0,0 +1,175 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
UTC_ARGS: --version 3
+; See PR-70845 for more details
+; RUN: opt < %s -S -passes=instcombine | FileCheck %s
+
+
+define signext i32 @sext_sext(i16 %x, i16 %y) {
nikic w
nikic wrote:
It looks like simplifyAssocCastAssoc() is the problematic transform. It
modifies a zext in-place without clearing poison flags.
https://github.com/llvm/llvm-project/pull/71534
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
nikic wrote:
Should be fixed by
https://github.com/llvm/llvm-project/commit/1b1c81772fe50a1cb2b2adf8d8cf442c0b73602f.
https://github.com/llvm/llvm-project/pull/71534
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bi
Author: Nikita Popov
Date: 2023-11-10T16:27:37+01:00
New Revision: cd7ba9f3d090afb5d3b15b0dcf379d15d1e11e33
URL:
https://github.com/llvm/llvm-project/commit/cd7ba9f3d090afb5d3b15b0dcf379d15d1e11e33
DIFF:
https://github.com/llvm/llvm-project/commit/cd7ba9f3d090afb5d3b15b0dcf379d15d1e11e33.diff
Author: Nikita Popov
Date: 2023-11-10T16:29:13+01:00
New Revision: 82f68a992b9f89036042d57a5f6345cb2925b2c1
URL:
https://github.com/llvm/llvm-project/commit/82f68a992b9f89036042d57a5f6345cb2925b2c1
DIFF:
https://github.com/llvm/llvm-project/commit/82f68a992b9f89036042d57a5f6345cb2925b2c1.diff
Author: Nikita Popov
Date: 2023-11-10T16:31:38+01:00
New Revision: 3a9cc17ca088267348e4b4a6e64a88a38ae9c6e4
URL:
https://github.com/llvm/llvm-project/commit/3a9cc17ca088267348e4b4a6e64a88a38ae9c6e4
DIFF:
https://github.com/llvm/llvm-project/commit/3a9cc17ca088267348e4b4a6e64a88a38ae9c6e4.diff
nikic wrote:
FYI I pushed
https://github.com/llvm/llvm-project/commit/3a9cc17ca088267348e4b4a6e64a88a38ae9c6e4
to hopefully unbreak the build.
https://github.com/llvm/llvm-project/pull/71688
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
@@ -247,6 +355,19 @@ define i1 @sext_zext_uge_op0_wide(i16 %x, i8 %y) {
ret i1 %c
}
+
+define i1 @sext_zext_nneg_uge_op0_wide(i16 %x, i8 %y) {
+; CHECK-LABEL: @sext_zext_nneg_uge_op0_wide(
+; CHECK-NEXT:[[TMP1:%.*]] = sext i8 [[Y:%.*]] to i16
+; CHECK-NEXT:[[C:%.*]]
@@ -0,0 +1,145 @@
+; RUN: opt < %s --O3 -S | FileCheck %s
nikic wrote:
You need to use `-O2 -Xclang -disable-llvm-optzns`, or manually drop the
`optnone` attributes.
https://github.com/llvm/llvm-project/pull/70845
___
nikic wrote:
Your original example does not verify: https://alive2.llvm.org/ce/z/Bkd89Z Can
you please provide a correct example of what you're trying to do?
https://github.com/llvm/llvm-project/pull/68502
___
cfe-commits mailing list
cfe-commits@list
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/70845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/70845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
Yes, I understand that this transform is only a step towards handling the full
pattern. I'm asking for a complete, working example of the original motivating
case. The snippets posted in
https://github.com/llvm/llvm-project/pull/68502#discussion_r1351618002 do not
appear to be co
nikic wrote:
Thanks for the updated example!
To explain what I meant in first comment using this example: We would perform
the transform https://alive2.llvm.org/ce/z/nllcB_, which does not depend at all
on how `%yx` is constructed, and whether there is any way to form the `fshl`
separately. I
Author: Nikita Popov
Date: 2023-11-13T12:37:14+01:00
New Revision: 1b36a9f0b71abbf02b9bccc3c2d4fd668a68d59d
URL:
https://github.com/llvm/llvm-project/commit/1b36a9f0b71abbf02b9bccc3c2d4fd668a68d59d
DIFF:
https://github.com/llvm/llvm-project/commit/1b36a9f0b71abbf02b9bccc3c2d4fd668a68d59d.diff
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/72118
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
> We don't have a `isGuaranteedNotToBeUndef` only function, so that's the only
> way. I would leave a fixme, since this call can be removed if we ever manage
> to kill undef.
I actually added this function earlier today.
> @nikic is something like this the right fix?
I'd move th
nikic wrote:
The problem for mpeg2decode seems to be that we do more `add` to `or disjoint`
conversions. But `or disjoint` is still being implemented, so e.g. in SCEV we
don't recognize it yet and fail to create an `add` SCEV for it. So I think we
need to do some more work on `or disjoint` and
nikic wrote:
I've put up https://github.com/llvm/llvm-project/pull/74467 to use disjoint in
SCEV.
https://github.com/llvm/llvm-project/pull/73662
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/73662
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
Rebased over the SCEV change. @dtcxzyw Can you please give it another try?
https://github.com/llvm/llvm-project/pull/73662
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData {
/// value. Otherwise return a ConstantInt for the given value.
static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false);
+ /// WARNING: Incomplete support, do not use. These methods exist for earl
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L,
// If the RHS of the compare is equal to the backedge taken count we need
// to add one to get the trip count.
if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) {
- ConstantInt *O
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData {
inline const APInt &getValue() const { return Val; }
/// getBitWidth - Return the bitwidth of this constant.
- unsigned getBitWidth() const { return Val.getBitWidth(); }
+ unsigned getBitWidth() const {
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData {
/// value. Otherwise return a ConstantInt for the given value.
static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false);
+ /// WARNING: Incomplete support, do not use. These methods exist for earl
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData {
inline const APInt &getValue() const { return Val; }
/// getBitWidth - Return the bitwidth of this constant.
- unsigned getBitWidth() const { return Val.getBitWidth(); }
+ unsigned getBitWidth() const {
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L,
// If the RHS of the compare is equal to the backedge taken count we need
// to add one to get the trip count.
if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) {
- ConstantInt *O
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L,
// If the RHS of the compare is equal to the backedge taken count we need
// to add one to get the trip count.
if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) {
- ConstantInt *O
nikic wrote:
Okay, it looks like the mpeg2decode regression is indeed fixed. I think the
only somewhat significant regression left is `Shootout-C++-ary2`, but in my IR
diffs I don't see any regression there (only improvements with a bunch of
conditions being optimized away).
https://github.co
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/73662
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
@bjope It looks like the InstCombine changes enable IndVars to perform LFTR,
which is unprofitable in this case. Though the `umax(1)` call is actually
completely unnecessary here, but SCEV doesn't realize it. I've put up
https://github.com/llvm/llvm-project/pull/75039 to fix that.
nikic wrote:
@yonghong-song I think it may be possible to improve CVP to handle this better,
in which case we won't need BPF workarounds. I'll look into it.
https://github.com/llvm/llvm-project/pull/73662
___
cfe-commits mailing list
cfe-commits@lists
https://github.com/nikic requested changes to this pull request.
I don't like the overall approach of assembling this from individual byte-sized
loads here. What I would expect to see is more something along these lines: If
we find a clobbering store that a) only clobbers some subset of the loa
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/72364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2128,6 +2129,105 @@ static void patchAndReplaceAllUsesWith(Instruction *I,
Value *Repl) {
I->replaceAllUsesWith(Repl);
}
+// split load to single byte loads and check if the value can be deduced
+//
+// Example:
+// define i32 @f(i8* %P)
+// 1: %b2 = getelementptr inbo
@@ -2128,6 +2129,105 @@ static void patchAndReplaceAllUsesWith(Instruction *I,
Value *Repl) {
I->replaceAllUsesWith(Repl);
}
+// split load to single byte loads and check if the value can be deduced
+//
+// Example:
+// define i32 @f(i8* %P)
+// 1: %b2 = getelementptr inbo
@@ -0,0 +1,166 @@
+; RUN: opt -S -O3 < %s
nikic wrote:
GVN tests should use `-passes=gvn` only, not `-O3`.
https://github.com/llvm/llvm-project/pull/72364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/72681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,32 @@
+// RUN: %clang --target=s390x-linux -S -emit-llvm -o - %s | FileCheck %s
nikic wrote:
Why is this a Driver test rather than a CodeGen test using clang_cc1?
https://github.com/llvm/llvm-project/pull/72886
nikic wrote:
The InstCombine/ptrmask.ll test is failing in CI.
https://github.com/llvm/llvm-project/pull/67166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Nikita Popov
Date: 2023-10-31T10:46:49+01:00
New Revision: 03ec84a00ba4d540222ab39c407e02959058fbdd
URL:
https://github.com/llvm/llvm-project/commit/03ec84a00ba4d540222ab39c407e02959058fbdd
DIFF:
https://github.com/llvm/llvm-project/commit/03ec84a00ba4d540222ab39c407e02959058fbdd.diff
nikic wrote:
I've reverted this change because it causes a large compile-time regression:
http://llvm-compile-time-tracker.com/compare.php?from=61b9176cf70444c54f3ac6eebd82fc9ffd69944d&to=33b85867e30e1adc2ff2173039c199b81c10f52b&stat=instructions:u
>From a quick glance at your implementation, I
@@ -5587,11 +5587,17 @@ Instruction
*InstCombinerImpl::foldICmpWithZextOrSext(ICmpInst &ICmp) {
return new ICmpInst(ICmp.getPredicate(), Builder.CreateOr(X, Y),
Constant::getNullValue(X->getType()));
+ // Treat "zext nneg" as "sext"
+
@@ -0,0 +1,185 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
UTC_ARGS: --tool ./bin/opt --version 3
+; See PRXXX for more details
+; RUN-./bin/opt: opt < %s -S -passes=ipsccp | FileCheck %s
nikic wrote:
This is an ipsccp test in t
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 %s -O2 -triple=x86_64-apple-darwin -emit-llvm -o - |
FileCheck %s
nikic wrote:
We don't test end-to-end codegen with clang. If you want to test this, you
should take the unoptimized clang IR and create a test in the
llvm/te
Author: Nikita Popov
Date: 2023-11-01T12:02:19+01:00
New Revision: 50848916e5e4f07231c7366e6d0014de6f7bc362
URL:
https://github.com/llvm/llvm-project/commit/50848916e5e4f07231c7366e6d0014de6f7bc362
DIFF:
https://github.com/llvm/llvm-project/commit/50848916e5e4f07231c7366e6d0014de6f7bc362.diff
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/67166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/67166
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -978,8 +1031,10 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value
*V, APInt DemandedMask,
}
// If the client is only demanding bits that we know, return the known
- // constant.
- if (DemandedMask.isSubsetOf(Known.Zero|Known.One))
+ // constant. We can't dir
@@ -6411,6 +6411,44 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value
*Op0, Value *Op1,
return Constant::getNullValue(ReturnType);
break;
}
+ case Intrinsic::ptrmask: {
+if (isa(Op0) || isa(Op1))
+ return PoisonValue::get(Op0->getType());
+
+
nikic wrote:
> Also adds AS = 0 as an optional argument to get() methods.
I believe that was intentionally omitted to make sure address spaces aren't
forgotten (getUnqual is used for the case where they aren't relevant). cc
@arsenm
Not sure whether this consideration is still relevant with o
nikic wrote:
@pmatos If you don't want to go all the way to target extension types, is it
possible to gracefully handle this in wasm's TTI cost model? Return an invalid
or very high cost in this case?
https://github.com/llvm/llvm-project/pull/71069
_
https://github.com/nikic approved this pull request.
LGTM
As a possible followup, we can probably drop the alignment assumption now? I
don't think it adds additional value if we're using ptrmask...
https://github.com/llvm/llvm-project/pull/71238
___
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
@@ -543,6 +543,14 @@ variables with initializers are marked as internal.
An interprocedural variant of :ref:`Sparse Conditional Constant Propagation
`.
+``ir-normalizer``: Transforms IR into a canonical form that's easier to diff
nikic wrote:
Looks like there
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/68176
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
https://github.com/nikic commented:
Could you please update the patch description with some information on what
kind of normalization the pass does?
It would also be great to post some examples, because I don't really get what
kind of renaming and reordering this does just looking at the test
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
@@ -0,0 +1,637 @@
+//===--- IRNormalizer.cpp - IR Normalizer ---===//
+//
+// 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: Apache-2.
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/68176
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
https://github.com/llvm/llvm-project/pull/71295
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1577,7 +1577,7 @@ Value
*PolynomialMultiplyRecognize::generate(BasicBlock::iterator At,
static bool hasZeroSignBit(const Value *V) {
if (const auto *CI = dyn_cast(V))
-return (CI->getType()->getSignBit() & CI->getSExtValue()) == 0;
+return (CI->getIntegerType()-
@@ -868,7 +868,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned
Opcode, Constant *C1,
}
if (GVAlign > 1) {
-unsigned DstWidth = CI2->getType()->getBitWidth();
+unsigned DstWidth = CI2->getIntegerType()->getBitWidth();
---
@@ -1062,7 +1062,7 @@ void PolynomialMultiplyRecognize::promoteTo(Instruction
*In,
// Promote immediates.
for (unsigned i = 0, n = In->getNumOperands(); i != n; ++i) {
if (ConstantInt *CI = dyn_cast(In->getOperand(i)))
- if (CI->getType()->getBitWidth() < DestBW)
@@ -673,8 +673,8 @@ void ConstantHoistingPass::findBaseConstants(GlobalVariable
*BaseGV) {
llvm::stable_sort(ConstCandVec, [](const ConstantCandidate &LHS,
const ConstantCandidate &RHS) {
if (LHS.ConstInt->getType() != RHS.ConstInt->g
@@ -1688,7 +1688,7 @@ void
PolynomialMultiplyRecognize::setupPreSimplifier(Simplifier &S) {
if (I->getOpcode() != Instruction::Or)
return nullptr;
ConstantInt *Msb = dyn_cast(I->getOperand(1));
- if (!Msb || Msb->getZExtValue() != Msb->getType()->getSi
@@ -6079,7 +6079,7 @@ static Value *simplifyRelativeLoad(Constant *Ptr,
Constant *Offset,
Type *Int32Ty = Type::getInt32Ty(Ptr->getContext());
auto *OffsetConstInt = dyn_cast(Offset);
- if (!OffsetConstInt || OffsetConstInt->getType()->getBitWidth() > 64)
+ if (!OffsetC
nikic wrote:
@eddyz87 Right, this is exactly the change I have been working on, see
https://github.com/llvm/llvm-project/pull/75311. Unfortunately, it doesn't
actually fix the BPF case, because that one involves a loop, and LVI is
currently terrible at handling those. (Basically, even though t
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/75311
>From 0b4f9e03bf84ffc0a24bc609879c96db9b1d2833 Mon Sep 17 00:00:00 2001
From: Nikita Popov
Date: Tue, 12 Dec 2023 15:55:29 +0100
Subject: [PATCH 1/2] [LVI] Support using block values when handling conditions
Curren
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/75311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
> Most all the recommended changes assume the code paths will work equally well
> for vector types as they do for scalar types. Can we be so sure this is the
> case? This is why I opted to keep the casting assertions with the exception
> of a few places where I could be sure the c
https://github.com/nikic approved this pull request.
LGTM -- I think this change is clearly right, independently of the ModuleID
issue.
https://github.com/llvm/llvm-project/pull/75079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/75448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -108,7 +143,23 @@ class generic_gep_type_iterator {
// that.
bool isStruct() const { return isa(CurTy); }
- bool isSequential() const { return isa(CurTy); }
+ bool isVector() const { return isa(CurTy); }
+ bool isSequential() const { return !isStruct(); }
+
+ // For
@@ -111,6 +111,20 @@ define void @test_evaluate_gep_as_ptrs_array(ptr
addrspace(2) %B) {
ret void
}
+define void @test_overaligned_vec(i8 %B) {
+; This should be turned into a constexpr instead of being an
instruction
+; CHECK-LABEL: @test_overaligned_vec(
+; TODO:
https://github.com/nikic commented:
Looks fine to me.
Alternative would be to forbid GEP indexing into vectors entirely.
https://github.com/llvm/llvm-project/pull/75448
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/75217
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/nikic approved this pull request.
LGTM
There are already C-style function signatures in the comments, so I don't see
value in keeping separate variable names.
https://github.com/llvm/llvm-project/pull/75668
___
cfe-commits mailing
nikic wrote:
When building clang with clang, the regression on SemaChecking.cpp is now
"only" 60% in terms of instructions retired (plus 0.4% during thin link, which
is another ~50% in terms of SemaChecking).
https://github.com/llvm/llvm-project/pull/75487
_
1 - 100 of 1388 matches
Mail list logo