[clang-tools-extra] d9b660b - [clangd] Remove unused using decls (NFC)

2023-09-24 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-09-24T00:01:05-07:00 New Revision: d9b660b261e25fd9ce28a9a1461a5fee0a388957 URL: https://github.com/llvm/llvm-project/commit/d9b660b261e25fd9ce28a9a1461a5fee0a388957 DIFF: https://github.com/llvm/llvm-project/commit/d9b660b261e25fd9ce28a9a1461a5fee0a388957.diff L

[clang] [Clang] Fix CXXRewrittenBinaryOperator::getDecomposedForm to handle case when spaceship operator returns comparison category by reference (PR #66270)

2023-09-24 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping @shafik, just needs a rebase :) https://github.com/llvm/llvm-project/pull/66270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Some adjustments for reloctable linking on OpenBSD (PR #67254)

2023-09-24 Thread Raul Tambre via cfe-commits
tambry wrote: reloctable→relocatable Just a fly-by, but IMO the commit message ought to describe the change – "some changes" doesn't give much insight. https://github.com/llvm/llvm-project/pull/67254 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] 3935a18 - [clang][Interp][NFC] Use GetPtrThisField intead of two ops

2023-09-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-24T09:56:48+02:00 New Revision: 3935a18a5c22e07a3afe31afd007457d3cec8133 URL: https://github.com/llvm/llvm-project/commit/3935a18a5c22e07a3afe31afd007457d3cec8133 DIFF: https://github.com/llvm/llvm-project/commit/3935a18a5c22e07a3afe31afd007457d3cec8133.diff LO

[clang] c97c28d - [clang][Interp][NFC] Make a local variable const

2023-09-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-24T09:56:49+02:00 New Revision: c97c28dfb3608a78cb70e99ecdc798f65941d46e URL: https://github.com/llvm/llvm-project/commit/c97c28dfb3608a78cb70e99ecdc798f65941d46e DIFF: https://github.com/llvm/llvm-project/commit/c97c28dfb3608a78cb70e99ecdc798f65941d46e.diff LO

[clang] f4aabc2 - [clang][Interp][NFC] Clean up EvalEmitter includes

2023-09-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-24T10:22:34+02:00 New Revision: f4aabc2d9d559decc7a8e0fcfb88e657194595e4 URL: https://github.com/llvm/llvm-project/commit/f4aabc2d9d559decc7a8e0fcfb88e657194595e4 DIFF: https://github.com/llvm/llvm-project/commit/f4aabc2d9d559decc7a8e0fcfb88e657194595e4.diff LO

[clang] a7fdbec - [clang][Interp][NFC] Clean up Context includes

2023-09-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-09-24T10:40:17+02:00 New Revision: a7fdbecfb3ce2446e6016a9c868805c97d8f1468 URL: https://github.com/llvm/llvm-project/commit/a7fdbecfb3ce2446e6016a9c868805c97d8f1468 DIFF: https://github.com/llvm/llvm-project/commit/a7fdbecfb3ce2446e6016a9c868805c97d8f1468.diff LO

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Yingwei Zheng via cfe-commits
@@ -1964,18 +1964,78 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) { break; } case Intrinsic::ptrmask: { +KnownBits Known(DL.getPointerTypeSizeInBits(II->getType())); +if (SimplifyDemandedInstructionBits(*II, Known)) + return II; + +Val

[clang-tools-extra] [clangd] fix compilation errors with newer versions of gRPC (PR #67258)

2023-09-24 Thread via cfe-commits
https://github.com/0xacc created https://github.com/llvm/llvm-project/pull/67258 in recent versions of gRPC, header files with prefix `grpc++` are deprecated. gRPC headers in include/grpc++ are deprecated since gRPC 1.10.0 https://github.com/grpc/grpc/releases/tag/v1.10.0 , this PR should close

[clang] [RISCV] Support floating point VCIX (PR #67094)

2023-09-24 Thread Brandon Wu via cfe-commits
@@ -2441,11 +2441,11 @@ define void @test_sf_vc_fvv_se_e16mf4( %vd, ; CHECK-NEXT:sf.vc.fvv 1, v8, v9, fa0 ; CHECK-NEXT:ret entry: - tail call void @llvm.riscv.sf.vc.fvv.se.iXLen.nxv1i16.f16.iXLen(iXLen 1, %vd, %vs2, half %fs1, iXLen %vl) + tail call void @llvm.ris

[clang] [RISCV] Support floating point VCIX (PR #67094)

2023-09-24 Thread Brandon Wu via cfe-commits
4vtomat wrote: > The target is support LLVM IR part only, we would like to prevent expose that > on the C intrinsic level if possible, because that's intentionally to expose > vector with unsigned integer only. Sure~ https://github.com/llvm/llvm-project/pull/67094

[clang] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65910 >From 9bb817aa40dd9bc1bbb18b4cf4bc079145c8ecaa Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 11 Sep 2023 03:58:02 +0800 Subject: [PATCH 1/2] [ValueTracking] Simplify uaddo pattern --- llvm/lib/Analysi

[clang-tools-extra] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65910 >From 9bb817aa40dd9bc1bbb18b4cf4bc079145c8ecaa Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 11 Sep 2023 03:58:02 +0800 Subject: [PATCH 1/2] [ValueTracking] Simplify uaddo pattern --- llvm/lib/Analysi

[clang] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
@@ -8291,6 +8291,29 @@ static std::optional isImpliedCondICmps(const ICmpInst *LHS, if (L0 == R0 && match(L1, m_APInt(LC)) && match(R1, m_APInt(RC))) return isImpliedCondCommonOperandWithConstants(LPred, *LC, RPred, *RC); + // L0 = R0 = L1 + R1, L0 >=u L1 implies R0 >=

[clang] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
@@ -8291,6 +8291,29 @@ static std::optional isImpliedCondICmps(const ICmpInst *LHS, if (L0 == R0 && match(L1, m_APInt(LC)) && match(R1, m_APInt(RC))) return isImpliedCondCommonOperandWithConstants(LPred, *LC, RPred, *RC); + // L0 = R0 = L1 + R1, L0 >=u L1 implies R0 >=

[clang-tools-extra] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -1984,10 +1984,30 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) { //-> (ptrmask p, (and A, B)) if (match(Op0, m_OneUse(m_Intrinsic( m_Value(InnerPtr), m_Value(InnerMask) { + // See if combining the two masks is fre

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -1985,6 +1985,28 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) { {InnerPtr, NewMask})); } } +bool Changed = false; +KnownBits Known = computeKnownBits(II, /*Depth*/ 0, II); +// See if we can deduce no

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -1985,6 +1985,28 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) { {InnerPtr, NewMask})); } } +bool Changed = false; +KnownBits Known = computeKnownBits(II, /*Depth*/ 0, II); +// See if we can deduce no

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -1985,6 +1985,28 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) { {InnerPtr, NewMask})); } } +bool Changed = false; +KnownBits Known = computeKnownBits(II, /*Depth*/ 0, II); +// See if we can deduce no

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -898,6 +910,53 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, } break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// Likely not much needs to be changed here to

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From 2f807b312baef8c6038c2452b84232acb6d6d2c2 Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 1/9] add define2 pp directive --- clang/include/clang/Basic/TokenKind

[clang] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

2023-09-24 Thread Matt Harding via cfe-commits
https://github.com/majaha updated https://github.com/llvm/llvm-project/pull/65876 >From 7c43c803764bf9e0256d4e3e9f497d2622bb8f69 Mon Sep 17 00:00:00 2001 From: Matt Harding Date: Fri, 25 Aug 2023 06:19:14 +0100 Subject: [PATCH 1/8] Add no-trap-after-noreturn flag and wasm tests Add the command

[clang-tools-extra] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

2023-09-24 Thread Matt Harding via cfe-commits
https://github.com/majaha updated https://github.com/llvm/llvm-project/pull/65876 >From 7c43c803764bf9e0256d4e3e9f497d2622bb8f69 Mon Sep 17 00:00:00 2001 From: Matt Harding Date: Fri, 25 Aug 2023 06:19:14 +0100 Subject: [PATCH 1/8] Add no-trap-after-noreturn flag and wasm tests Add the command

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH 1/7] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c)

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH 1/7] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c)

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 1/9] add define2 pp directive --- clang/include/clang/Basic/TokenKind

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 6fbbcb4ee724e23edd0fcd5b51877aff19dabd77 49d7fa2e638f3903375f6f1de8443c63ff909a5d --

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-09-24 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > I wonder how to proceed with the patch at hand. I'm not a Solaris expert, but based on this discussion I'd consider adding support for `-fuse-ld` in Flang. This sort of changes are often as simple as updating Options.td. Same for `-r`. One important rule of thumb that I'

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 01/10] add define2 pp directive --- clang/include/clang/Basic/TokenKi

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 01/11] add define2 pp directive --- clang/include/clang/Basic/TokenKi

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-09-24 Thread Daniel Bertalan via Phabricator via cfe-commits
BertalanD added a comment. FYI, we found a crash related to this patch: https://github.com/llvm/llvm-project/issues/67260 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159126/new/ https://reviews.llvm.org/D159126 _

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 01/12] add define2 pp directive --- clang/include/clang/Basic/TokenKi

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 01/13] add define2 pp directive --- clang/include/clang/Basic/TokenKi

[libunwind] [docs] Minor fix to outdated example in LibTooling tutorial (PR #67262)

2023-09-24 Thread Ivan Ho via cfe-commits
https://github.com/hhkit created https://github.com/llvm/llvm-project/pull/67262 Came across this while using said tutorial. I grabbed this example from [ASTMatchers tutorial](https://clang.llvm.org/docs/LibASTMatchersTutorial.html) for consistency, and it works with the latest LLVM version.

[libunwind] [docs] Minor fix to outdated example in LibTooling tutorial (PR #67262)

2023-09-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Changes Came across this while using said tutorial. I grabbed this example from [ASTMatchers tutorial](https://clang.llvm.org/docs/LibASTMatchersTutorial.html) for consistency, and it works with the latest LLVM version. --- Full diff: https://g

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 01/14] add define2 pp directive --- clang/include/clang/Basic/TokenKi

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-24 Thread via cfe-commits
https://github.com/DaMatrix updated https://github.com/llvm/llvm-project/pull/66894 >From 8768741800aae37a825864e2ee782484ed073ce9 Mon Sep 17 00:00:00 2001 From: DaPorkchop_ Date: Sun, 13 Aug 2023 22:39:12 +0200 Subject: [PATCH] [clang] Implement constexpr bit_cast for vectors --- clang/lib/A

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-24 Thread via cfe-commits
DaMatrix wrote: While attempting to make the result properly endianness-dependent, I noticed that `VectorExprEvaluator::VisitCastExpr` with `CK_BitCast` already had code for this which takes the byte ordering into account (although it also didn't handle bool vectors correctly either). I've now

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-24 Thread via cfe-commits
@@ -463,3 +463,38 @@ static_assert(bit_cast(ld539) == fivehundredandthirtynine, ""); static_assert(round_trip<__int128_t>(34.0L)); #endif } + +namespace test_vector { + +typedef unsigned uint2 __attribute__((vector_size(2 * sizeof(unsigned; +typedef char byte8 __attribute_

[clang] [clang] Implement constexpr bit_cast for vectors (PR #66894)

2023-09-24 Thread via cfe-commits
@@ -7095,6 +7096,40 @@ class APValueToBufferConverter { return true; } + bool visitVector(const APValue &Val, QualType Ty, CharUnits Offset) { +const auto *VT = Ty->castAs(); +unsigned VectorLength = Val.getVectorLength(); + +if (VT->isExtVectorBoolType()) {

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 01/15] add define2 pp directive --- clang/include/clang/Basic/TokenKi

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
https://github.com/kelbon updated https://github.com/llvm/llvm-project/pull/65851 >From d10ce5dd9e49fe85eac2e1f93a65cb27b511a71f Mon Sep 17 00:00:00 2001 From: Kelbon Nik Date: Sat, 9 Sep 2023 17:51:15 +0400 Subject: [PATCH 01/16] add define2 pp directive --- clang/include/clang/Basic/TokenKi

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread via cfe-commits
goldsteinn wrote: LGTM. https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread via cfe-commits
goldsteinn wrote: LGTM. https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread via cfe-commits
@@ -8291,6 +8291,29 @@ static std::optional isImpliedCondICmps(const ICmpInst *LHS, if (L0 == R0 && match(L1, m_APInt(LC)) && match(R1, m_APInt(RC))) return isImpliedCondCommonOperandWithConstants(LPred, *LC, RPred, *RC); + // L0 = R0 = L1 + R1, L0 >=u L1 implies R0 >=

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -6380,7 +6380,69 @@ Instruction *InstCombinerImpl::foldICmpUsingBoolRange(ICmpInst &I) { Y->getType()->isIntOrIntVectorTy(1) && Pred == ICmpInst::ICMP_ULE) return BinaryOperator::CreateOr(Builder.CreateIsNull(X), Y); + // icmp eq/ne X, (zext/sext (icmp eq/ne X,

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Nikita Popov via cfe-commits
@@ -6380,7 +6380,69 @@ Instruction *InstCombinerImpl::foldICmpUsingBoolRange(ICmpInst &I) { Y->getType()->isIntOrIntVectorTy(1) && Pred == ICmpInst::ICMP_ULE) return BinaryOperator::CreateOr(Builder.CreateIsNull(X), Y); + // icmp eq/ne X, (zext/sext (icmp eq/ne X,

[clang] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
@@ -8291,6 +8291,29 @@ static std::optional isImpliedCondICmps(const ICmpInst *LHS, if (L0 == R0 && match(L1, m_APInt(LC)) && match(R1, m_APInt(RC))) return isImpliedCondCommonOperandWithConstants(LPred, *LC, RPred, *RC); + // L0 = R0 = L1 + R1, L0 >=u L1 implies R0 >=

[clang] [ValueTracking] Simplify uaddo pattern (PR #65910)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw unresolved https://github.com/llvm/llvm-project/pull/65910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH 1/8] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c)

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65852 >From d9d8bcbb98e8f5aecb9733329389d61a489bd731 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Sat, 9 Sep 2023 23:07:29 +0800 Subject: [PATCH 1/8] [InstCombine] Simplify the pattern `a ne/eq (zext (a ne/eq c)

[clang] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [InstCombine] Simplify the pattern `a ne/eq (zext/sext (a ne/eq c))` (PR #65852)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Extension: allow recursive macros (PR #65851)

2023-09-24 Thread via cfe-commits
kelbon wrote: Version with `__THIS_MACRO__` instead of new preprocessor directive is ready, so actual examples are like ```C++ #define reverse(head, ...) __VA_OPT__(__THIS_MACRO__(__VA_ARGS__) , ) head ``` `__THIS_MACRO__` behaves exactly as macro name(`reverse` in this case), but its allowed

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

[clang] 7523550 - [Clang][CodeGen] Add __builtin_bcopy (#67130)

2023-09-24 Thread via cfe-commits
Author: Carlos Eduardo Seo Date: 2023-09-24T11:58:14-03:00 New Revision: 7523550853dbb0c66c17f424d60201bde4ec3bb7 URL: https://github.com/llvm/llvm-project/commit/7523550853dbb0c66c17f424d60201bde4ec3bb7 DIFF: https://github.com/llvm/llvm-project/commit/7523550853dbb0c66c17f424d60201bde4ec3bb7.

[clang] [Clang][CodeGen] Add __builtin_bcopy (PR #67130)

2023-09-24 Thread Carlos Eduardo Seo via cfe-commits
https://github.com/ceseo closed https://github.com/llvm/llvm-project/pull/67130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Hook up NetBSD/riscv64 support (PR #67256)

2023-09-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/67256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Hook up NetBSD/riscv64 support (PR #67256)

2023-09-24 Thread Fangrui Song via cfe-commits
@@ -124,6 +130,14 @@ // AARCH64_BE-7: "-lm" "-lc" // AARCH64_BE-7: "{{.*}}/usr/lib{{/|}}crtend.o" "{{.*}}/usr/lib{{/|}}crtn.o" +// RISCV64: "-cc1" "-triple" "riscv64-unknown-netbsd" +// RISCV64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so" ---

[clang] [Driver] Some adjustments for reloctable linking on OpenBSD (PR #67254)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/67254 >From fdcdea6353a7931a9e57dd3d0b4f6cf1b35085c3 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 24 Sep 2023 00:20:53 -0400 Subject: [PATCH] [Driver] Some adjustments for relocatable linking on OpenBSD --- clan

[clang] [Driver] Some adjustments for relocatable linking on OpenBSD (PR #67254)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/67254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread via cfe-commits
@@ -898,6 +910,53 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, } break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// Likely not much needs to be changed here to

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread via cfe-commits
@@ -898,6 +910,53 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, } break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// Likely not much needs to be changed here to

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread via cfe-commits
@@ -1984,10 +1984,30 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) { //-> (ptrmask p, (and A, B)) if (match(Op0, m_OneUse(m_Intrinsic( m_Value(InnerPtr), m_Value(InnerMask) { + // See if combining the two masks is fre

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-09-24 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/67166 >From a2e343dab6e698621a9121c767d2dca285d27b5d Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Fri, 22 Sep 2023 08:21:21 -0500 Subject: [PATCH 1/9] [InstSimplify] Add tests for simplify `llvm.ptrmask`; NFC

[clang] [Driver] -include: do not probe .gch (PR #67084)

2023-09-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/67084 >From f3479f95f7c11e36de4fff5dc01bb27a02db Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 12 Sep 2023 18:31:18 -0700 Subject: [PATCH] [Driver] -include: deprecate probing .gch `-include a.h` probes `

[clang] [Driver] -include: deprecate probing .gch (PR #67084)

2023-09-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/67084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] -include: deprecate probing .gch (PR #67084)

2023-09-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/67084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] -include: deprecate probing .gch (PR #67084)

2023-09-24 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Xcode is actively using this feature: the `.pch` extension is used for > headers that are to be precompiled, the `.pch.gch` extension is used for the > actual precompiled header, and Clang is expected to expand the given > `-include X.pch` argument into `-include-pch X.pch.gch

[clang] 6876514 - Fix assertion failure mangling an unresolved template argument that

2023-09-24 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2023-09-24T11:52:58-07:00 New Revision: 68765143c6765a694d40d4c3fea43893cc025433 URL: https://github.com/llvm/llvm-project/commit/68765143c6765a694d40d4c3fea43893cc025433 DIFF: https://github.com/llvm/llvm-project/commit/68765143c6765a694d40d4c3fea43893cc025433.diff

[clang] [flang][Driver] Support -rpath, -shared, and -static in the frontend (PR #66702)

2023-09-24 Thread Fangrui Song via cfe-commits
MaskRay wrote: I think Windows does not work likely because `ld` is absent in PATH. You need `-Bxxx/bin` to specify a directory that contains `ld`, but I don't remember whether `ld.exe` is needed instead. https://github.com/llvm/llvm-project/pull/66702 _

[clang] [Driver] Hook up NetBSD/riscv64 support (PR #67256)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/67256 >From 949ffebe8d74fd5ca27551934bd7a565022ebaa7 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 24 Sep 2023 02:29:27 -0400 Subject: [PATCH] [Driver] Hook up NetBSD/riscv64 support --- clang/lib/Basic/Targets.c

[clang] [Driver] Hook up NetBSD/riscv64 support (PR #67256)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 resolved https://github.com/llvm/llvm-project/pull/67256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

2023-09-24 Thread Heejin Ahn via cfe-commits
aheejin wrote: > > Can you point out what are the unsupported options here? > > All of them, they are all options that translate to TargetOptions, and they > do nothing for a wasm target triple: ` --trap-unreachable=false > --xcoff-traceback-table=true --relax-elf-relocations=false --vec-extab

[clang] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

2023-09-24 Thread Heejin Ahn via cfe-commits
aheejin wrote: > > Can you point out what are the unsupported options here? > > All of them, they are all options that translate to TargetOptions, and they > do nothing for a wasm target triple: ` --trap-unreachable=false > --xcoff-traceback-table=true --relax-elf-relocations=false --vec-extab

[clang] [clang-format] Disable OuterScope lambda indentation behaviour for constructor initializers (PR #66755)

2023-09-24 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: You should adapt the documentation. https://github.com/llvm/llvm-project/pull/66755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in aligning trailing comments (PR #67221)

2023-09-24 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/67221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format][NFC] Clean up alignTrailingComments() (PR #67218)

2023-09-24 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/67218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Hook up NetBSD/riscv64 support (PR #67256)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/67256 >From 2c5311b844f9ad08b0357ea2b79d0d8bee922296 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 24 Sep 2023 02:29:27 -0400 Subject: [PATCH] [Driver] Hook up NetBSD/riscv support --- clang/lib/Basic/Targets.cpp

[clang] [Driver] Hook up NetBSD/riscv support (PR #67256)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/67256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Hook up NetBSD/riscv support (PR #67256)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/67256 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 62ffbe0 - [Driver] Hook up NetBSD/riscv support (#67256)

2023-09-24 Thread via cfe-commits
Author: Brad Smith Date: 2023-09-24T16:29:46-04:00 New Revision: 62ffbe0dcca9f394f9dbfda160e0f0a1e96948ae URL: https://github.com/llvm/llvm-project/commit/62ffbe0dcca9f394f9dbfda160e0f0a1e96948ae DIFF: https://github.com/llvm/llvm-project/commit/62ffbe0dcca9f394f9dbfda160e0f0a1e96948ae.diff LO

[clang] [Driver] Hook up Haiku ARM support (PR #67222)

2023-09-24 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/67222 >From b9ad72d918c663f7b5ee782979ce5704b23aa370 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 23 Sep 2023 03:22:18 -0400 Subject: [PATCH] [Driver] Hook up Haiku ARM support --- clang/lib/Basic/Targets.cpp

[clang] [NFC][Clang][CodeGen] Improve performance for vtable metadata generation (PR #67066)

2023-09-24 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/67066 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65934 >From 2fe5756dd4d49580d3a23b0ff1b72535f725915e Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 11 Sep 2023 15:51:46 +0800 Subject: [PATCH 1/4] [RISCV] Eliminate dead li after emitting VSETVLIs --- llvm/

[clang] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/65934 >From 2fe5756dd4d49580d3a23b0ff1b72535f725915e Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Mon, 11 Sep 2023 15:51:46 +0800 Subject: [PATCH 1/4] [RISCV] Eliminate dead li after emitting VSETVLIs --- llvm/

[clang-tools-extra] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-09-24 Thread Yingwei Zheng via cfe-commits
@@ -757,7 +757,8 @@ class RISCVInsertVSETVLI : public MachineFunctionPass { bool computeVLVTYPEChanges(const MachineBasicBlock &MBB, VSETVLIInfo &Info) const; void computeIncomingVLVTYPE(const MachineBasicBlock &MBB); - void emitVSETVLIs(Machin

[clang] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-09-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw resolved https://github.com/llvm/llvm-project/pull/65934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Eliminate dead li after emitting VSETVLIs (PR #65934)

2023-09-24 Thread Yingwei Zheng via cfe-commits
@@ -757,7 +757,8 @@ class RISCVInsertVSETVLI : public MachineFunctionPass { bool computeVLVTYPEChanges(const MachineBasicBlock &MBB, VSETVLIInfo &Info) const; void computeIncomingVLVTYPE(const MachineBasicBlock &MBB); - void emitVSETVLIs(Machin

  1   2   >