[clang] [clang][Sema] Add noinline check for __builtin_frame_address and __builtin_return_address (PR #82966)

2024-02-26 Thread Timothy Herchen via cfe-commits
https://github.com/anematode edited https://github.com/llvm/llvm-project/pull/82966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for deleted functions (PR #83055)

2024-02-26 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/83055 >From dd493ba55511aef26d5662bb17209571bc49c7ff Mon Sep 17 00:00:00 2001 From: AMS21 Date: Mon, 26 Feb 2024 21:45:12 +0100 Subject: [PATCH] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for

[clang] [APINotes] Fix a few accidental refactoring artifacts (PR #83057)

2024-02-26 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/83057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Natalie Chouinard via cfe-commits
https://github.com/sudonatalie updated https://github.com/llvm/llvm-project/pull/82536 >From 91600507765679e92434ec7c5edb883bf01f847f Mon Sep 17 00:00:00 2001 From: Natalie Chouinard Date: Wed, 21 Feb 2024 21:18:20 + Subject: [PATCH 1/2] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic suppo

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Natalie Chouinard via cfe-commits
@@ -1427,6 +1432,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, .addUse(I.getOperand(2).getReg()) .addUse(I.getOperand(3).getReg()); break; + case Intrinsic::dx_thread_id: +return selectDXThreadId(ResVReg, ResType, I); --

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Natalie Chouinard via cfe-commits
@@ -0,0 +1,76 @@ +; RUN: llc -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; This file generated from the following HLSL: +; clang -cc1 -triple spirv-vulkan-library

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for deleted functions (PR #83055)

2024-02-26 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/83055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for deleted functions (PR #83055)

2024-02-26 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. https://github.com/llvm/llvm-project/pull/83055 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-missing-std-forward` false positive for deleted functions (PR #83055)

2024-02-26 Thread Julian Schmidt via cfe-commits
@@ -134,6 +134,10 @@ Changes in existing checks ` check by ignoring local variable with ``[maybe_unused]`` attribute. +- Fixed :doc:`cppcoreguidelines-missing-std-forward + ` check giving false + positives for deleted functions. + 5chmidti wrote: Nit: I

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin deleted https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -0,0 +1,132 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -target-cpu pwr8 \ +// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK-DEF +// RUN: %clang_

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-02-26 Thread zhijian lin via cfe-commits
@@ -0,0 +1,132 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 2 + +// RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -target-cpu pwr8 \ diggerlin wrote: do you really need `-target-cpu pwr8` since the tes

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 Thread William Moses via cfe-commits
https://github.com/wsmoses created https://github.com/llvm/llvm-project/pull/83059 This PR adds functionality for specifying an LLVM function attribute within clang. This is necessary for transfering information from C++ into LLVM which doens't have a C++-level attribute. This functionality ha

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Xiang Li via cfe-commits
@@ -0,0 +1,76 @@ +; RUN: llc -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; This file generated from the following HLSL: +; clang -cc1 -triple spirv-vulkan-library

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: William Moses (wsmoses) Changes This PR adds functionality for specifying an LLVM function attribute within clang. This is necessary for transfering information from C++ into LLVM which doens't have a C+

[clang] [llvm] [clang][Diagnostics] Add CLANG_HIGHLIGHT_COLORS= to configure syntax highlighting in diagnostics (#82945) (PR #83060)

2024-02-26 Thread via cfe-commits
https://github.com/nabijaczleweli created https://github.com/llvm/llvm-project/pull/83060 ![](https://github.com/llvm/llvm-project/assets/6709544/5b540e17-a7aa-4188-87b7-be70cebce300) `CLANG_HIGHLIGHT_COLORS=on` is equivalent to unset, and enables the default. `CLANG_HIGHLIGHT_COLORS=off` (or

[clang] [llvm] [clang][Diagnostics] Add CLANG_HIGHLIGHT_COLORS= to configure syntax highlighting in diagnostics (#82945) (PR #83060)

2024-02-26 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [llvm] [clang][Diagnostics] Add CLANG_HIGHLIGHT_COLORS= to configure syntax highlighting in diagnostics (#82945) (PR #83060)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: наб (nabijaczleweli) Changes ![](https://github.com/llvm/llvm-project/assets/6709544/5b540e17-a7aa-4188-87b7-be70cebce300) `CLANG_HIGHLIGHT_COLORS=on` is equivalent to unset, and enables the default. `CLANG_HIGHLIGHT_COLORS=off` (or `=no`

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 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 99335a646bc0b10066d77cec08ae8cab0162efde 0afeea9dcc8b02ade26e6ec0652ae1fa6ec33a7c --

[clang] [llvm] [clang][Diagnostics] Add CLANG_HIGHLIGHT_COLORS= to configure syntax highlighting in diagnostics (#82945) (PR #83060)

2024-02-26 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 83feb846482f0100cb29d460d3d8de2690fc32ad 81b1327c3b5104b0c053fd1ee8e8773925efb8dd --

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 Thread William Moses via cfe-commits
https://github.com/wsmoses updated https://github.com/llvm/llvm-project/pull/83059 >From b6ab7f38406cd51670bd2a1253142243cf80a433 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 26 Feb 2024 16:17:55 -0500 Subject: [PATCH] [Clang][HTO] Add clang attribute for propagating llvm-level

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - | FileCheck %s + +void t1() __attribute__((llvm_fn_attr("custom_attr", "custom_value"), llvm_fn_attr("second_attr", "second_value"))); + +void t1() +{ +} + +void t2(); + +void t3() { + t2() at

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Xiang Li via cfe-commits
@@ -0,0 +1,76 @@ +; RUN: llc -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; This file generated from the following HLSL: +; clang -cc1 -triple spirv-vulkan-library

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Natalie Chouinard via cfe-commits
@@ -1,28 +1,25 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s sudonatalie wrote: Note: This test didn't actually have a call to `FileCheck` before, so I had to make some min

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Natalie Chouinard via cfe-commits
@@ -1,28 +1,25 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o -

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 Thread William Moses via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - | FileCheck %s + +void t1() __attribute__((llvm_fn_attr("custom_attr", "custom_value"), llvm_fn_attr("second_attr", "second_value"))); + +void t1() +{ +} + +void t2(); + +void t3() { + t2() at

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -16560,32 +16560,69 @@ Value *CodeGenFunction::EmitPPCBuiltinExpr(unsigned BuiltinID, #include "llvm/TargetParser/PPCTargetParser.def" auto GenAIXPPCBuiltinCpuExpr = [&](unsigned SupportMethod, unsigned FieldIdx, - unsigned CompOp, +

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -141,23 +149,30 @@ PPC_LNX_CPU("power10",47) #define AIX_BUILTIN_PPC_TRUE 1 #define AIX_BUILTIN_PPC_FALSE 0 #define USE_SYS_CONF 2 + #define SYS_CALL 3 // Supported COMPARE_OP values. #define COMP_EQ 0 + #define COMP_GT 1 + #define COMP_GE 2 + #define COMP

[clang] [Clang][Sema] Fix missing warning when comparing mismatched enums in … (PR #81418)

2024-02-26 Thread via cfe-commits
Kupa-Martin wrote: If everything looks good could someone please merge this pr? I dont have commit access. https://github.com/llvm/llvm-project/pull/81418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [NFC][HLSL] Fix broken test (PR #83062)

2024-02-26 Thread Natalie Chouinard via cfe-commits
https://github.com/sudonatalie created https://github.com/llvm/llvm-project/pull/83062 Noticed while implementing #82536 that this test was also missing the call the FileCheck. >From 3946bd3188e5e9b9765301057cc53b7ac06f184b Mon Sep 17 00:00:00 2001 From: Natalie Chouinard Date: Mon, 26 Feb 20

[clang] [NFC][HLSL] Fix broken test (PR #83062)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Natalie Chouinard (sudonatalie) Changes Noticed while implementing #82536 that this test was also missing the call the FileCheck. --- Full diff: https://github.com/llvm/llvm-project/pull/83062.diff 1 Files Affected: - (modified) clang/

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-02-26 Thread via cfe-commits
https://github.com/Sirraide created https://github.com/llvm/llvm-project/pull/83063 C23 6.3.1.8 ‘Usual arithmetic conversions’ p1 states (emphasis mine): > Otherwise, if the corresponding real type of either operand is `float`, the > other operand is converted, *without change of type domain*,

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Sirraide) Changes C23 6.3.1.8 ‘Usual arithmetic conversions’ p1 states (emphasis mine): > Otherwise, if the corresponding real type of either operand is `float`, the other operand is converted, *without change of type domain*, to a

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-02-26 Thread via cfe-commits
Sirraide wrote: CC @AaronBallman https://github.com/llvm/llvm-project/pull/83063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-26 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/83065 The values for `__has_cpp_attribute` don't have to be guarded behind `LangOpts.CPlusPlus` because `__has_cpp_attribute` isn't available if Clang isn't in a C++ mode. Fixes #82995 >From b64d25b222b4c8c483

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-02-26 Thread via cfe-commits
@@ -10,34 +10,32 @@ _Complex float cf; int volatile vol =10; void f0() { const_cast(cf) = const_cast(cf) + 1; -// CHECK: %cf.real = load volatile float, ptr @cf -// CHECK: %cf.imag = load volatile float, ptr getelementptr -// CHECK: %add.r = fadd float %cf.real, 1.00

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes The values for `__has_cpp_attribute` don't have to be guarded behind `LangOpts.CPlusPlus` because `__has_cpp_attribute` isn't available if Clang isn't in a C++ mode. Fixes #82995 --- Full diff: ht

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-02-26 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From 500af5e845222c67c70efbe8bc8653e8b5860889 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [llvm] [clang][Diagnostics] Add CLANG_HIGHLIGHT_COLORS= to configure syntax highlighting in diagnostics (#82945) (PR #83060)

2024-02-26 Thread via cfe-commits
https://github.com/nabijaczleweli updated https://github.com/llvm/llvm-project/pull/83060 From a786f5c27ce7d25553a224bcc92185755b3875d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 26 Feb 2024 21:58:24 +0100 Subject: [PATCH] [clang][Diagnostics] Add CLANG_HIGHLIGHT_C

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/82956 >From f7471303abf989ceb1bdbce0d580d74097572dec Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sun, 25 Feb 2024 11:13:40 -0500 Subject: [PATCH] [HIP] fix host min/max in header CUDA defines min/max funct

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-02-26 Thread via cfe-commits
Sirraide wrote: Since this is a relatively benign bug, all things considered, does this even warrant a release note? https://github.com/llvm/llvm-project/pull/83063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Yaxun Liu via cfe-commits
@@ -1306,15 +1306,68 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } -#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -__host__ inline static int min(int __a

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-02-26 Thread via cfe-commits
Sirraide wrote: >From what I can tell, this also fixes #31205 https://github.com/llvm/llvm-project/pull/83063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-02-26 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From b25d3b422a57ff1c872a33f1db1e0ba9dcedb086 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-26 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna updated https://github.com/llvm/llvm-project/pull/78000 >From c39871ed2ec642ab00360f2c3a18fba7c915f82d Mon Sep 17 00:00:00 2001 From: Yeoul Na Date: Mon, 18 Dec 2023 10:58:16 +0900 Subject: [PATCH 1/6] [BoundsSafety] Introduce CountAttributedType CountAttributedType

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-26 Thread Yeoul Na via cfe-commits
rapidsna wrote: Gentle reminder @bwendling @AaronBallman. I'd like to land this patch soon, so we can open source more of -fbounds-safety work. Could you please take a look? https://github.com/llvm/llvm-project/pull/78000 ___ cfe-commits mailing list

[clang] [ObjC] Check entire chain of superclasses to see if class layout is statically known (PR #81335)

2024-02-26 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From b25d3b422a57ff1c872a33f1db1e0ba9dcedb086 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add pre-commi

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Eli Friedman via cfe-commits
@@ -294,18 +297,49 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, return false; const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); +const CGRecordLayout &CGRL = CGTypes.getCGRecordLayout(RD); unsigned idx = 0; -for (RecordDecl::field

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Eli Friedman via cfe-commits
@@ -294,18 +297,49 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, return false; const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); +const CGRecordLayout &CGRL = CGTypes.getCGRecordLayout(RD); unsigned idx = 0; -for (RecordDecl::field

[clang] 21d8332 - [clang] Implement __builtin_popcountg (#82359)

2024-02-26 Thread via cfe-commits
Author: OverMighty Date: 2024-02-26T13:59:42-08:00 New Revision: 21d83324fbdbd91de0115d48f3b55979f57807b7 URL: https://github.com/llvm/llvm-project/commit/21d83324fbdbd91de0115d48f3b55979f57807b7 DIFF: https://github.com/llvm/llvm-project/commit/21d83324fbdbd91de0115d48f3b55979f57807b7.diff LO

[clang] [clang] Implement __builtin_popcountg (PR #82359)

2024-02-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers closed https://github.com/llvm/llvm-project/pull/82359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 Thread William Moses via cfe-commits
https://github.com/wsmoses updated https://github.com/llvm/llvm-project/pull/83059 >From c01b559836ca62648c5f95a6441888514347a1ea Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 26 Feb 2024 16:17:55 -0500 Subject: [PATCH] [Clang][HTO] Add clang attribute for propagating llvm-level

[clang] a870a48 - [HLSL] Fix casting asserts (#82827)

2024-02-26 Thread via cfe-commits
Author: Farzon Lotfi Date: 2024-02-26T16:12:13-06:00 New Revision: a870a48c09ea32a5c179e827ed60e53e748cbc49 URL: https://github.com/llvm/llvm-project/commit/a870a48c09ea32a5c179e827ed60e53e748cbc49 DIFF: https://github.com/llvm/llvm-project/commit/a870a48c09ea32a5c179e827ed60e53e748cbc49.diff

[clang] [HLSL] Fix casting asserts (PR #82827)

2024-02-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/82827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread via cfe-commits
https://github.com/PiJoules created https://github.com/llvm/llvm-project/pull/83071 Clang was incorrectly finding the start of the exponent in a fixed point hex literal. It would unconditionally find the first `e/E/p/P` in a constant regardless of if it were hex or not and parser the remaining

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (PiJoules) Changes Clang was incorrectly finding the start of the exponent in a fixed point hex literal. It would unconditionally find the first `e/E/p/P` in a constant regardless of if it were hex or not and parser the remaining dig

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-26 Thread Jun Wang via cfe-commits
jwanggit86 wrote: @Pierre-vh Any further comments? https://github.com/llvm/llvm-project/pull/79236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-02-26 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/82968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-02-26 Thread Eli Friedman via cfe-commits
@@ -10737,6 +10752,43 @@ SDValue PPCTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, return DAG.getRegister(PPC::X13, MVT::i64); return DAG.getRegister(PPC::R2, MVT::i32); + case Intrinsic::ppc_rldimi: { +uint64_t SH = Op.getConstantOperandVal(3); +unsig

[clang] [llvm] [PowerPC] Add intrinsics for rldimi/rlwimi/rlwnm (PR #82968)

2024-02-26 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: If you run into issues using normal integer ops, please file bugs. Most people aren't going to hand-tune their code like this; builtins like this are at best an ugly workaround. That said, I guess I'm not strongly against adding a backdoor to force

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan edited https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
https://github.com/amy-kwan commented: A question: For `PPCTLSDynamicCall.cpp`, would it be better if we instead reworded some of the sentences and not use `Load*@toc`? I thought about this for a bit and I think the full sentences may be a bit better, so I added some sample comment suggestions

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,96 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,96 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -370,11 +370,22 @@ namespace llvm { /// G8RC = TLSGD_AIX, TOC_ENTRY, TOC_ENTRY /// Op that combines two register copies of TOC entries /// (region handle into R3 and variable offset into R4) followed by a -/// GET_TLS_ADDR node which will be expanded to a cal

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,96 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,96 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2024-02-26 Thread Amy Kwan via cfe-commits
@@ -145,9 +164,96 @@ namespace { .addImm(0); if (IsAIX) { - // The variable offset and region handle are copied in r4 and r3. The - // copies are followed by GETtlsADDR32AIX/GETtlsADDR64AIX

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Chris B via cfe-commits
@@ -0,0 +1,76 @@ +; RUN: llc -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %} + +; This file generated from the following HLSL: +; clang -cc1 -triple spirv-vulkan-library

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,11 @@ +/// This is the regression test for https://github.com/llvm/llvm-project/issues/83050. +/// This just needs to compile. +// RUN: %clang_cc1 -x c++ -ffixed-point -S %s -o /dev/null -triple=x86_64-linux -ffixed-point nickdesaulniers wrote: Consi

[clang] [llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

2024-02-26 Thread Chris B via cfe-commits
@@ -27,6 +27,7 @@ #include "llvm/CodeGen/GlobalISel/InstructionSelector.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" +#include "llvm/IR/IntrinsicsDirectX.h" llvm-beanz wrote: I think this is unnecessary now. h

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread via cfe-commits
https://github.com/lntue approved this pull request. https://github.com/llvm/llvm-project/pull/83071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][HLSL] Fix broken test (PR #83062)

2024-02-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/83062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,11 @@ +/// This is the regression test for https://github.com/llvm/llvm-project/issues/83050. +/// This just needs to compile. +// RUN: %clang_cc1 -x c++ -ffixed-point -S %s -o /dev/null -triple=x86_64-linux -ffixed-point +static constexpr unsigned short _Fract SQRT_F

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/82956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Artem Belevich via cfe-commits
@@ -1306,15 +1306,73 @@ float min(float __x, float __y) { return __builtin_fminf(__x, __y); } __DEVICE__ double min(double __x, double __y) { return __builtin_fmin(__x, __y); } -#if !defined(__HIPCC_RTC__) && !defined(__OPENMP_AMDGCN__) -__host__ inline static int min(int __a

[clang] [HIP] fix host min/max in header (PR #82956)

2024-02-26 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/82956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread via cfe-commits
@@ -0,0 +1,11 @@ +/// This is the regression test for https://github.com/llvm/llvm-project/issues/83050. +/// This just needs to compile. +// RUN: %clang_cc1 -x c++ -ffixed-point -S %s -o /dev/null -triple=x86_64-linux -ffixed-point +static constexpr unsigned short _Fract SQRT_F

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/83071 >From f14ff8098b748944cdc10bc1421c9002dd6ef16e Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Mon, 26 Feb 2024 14:11:45 -0800 Subject: [PATCH] [clang] Add fix for GH issue 83050 Clang was incorrectly finding

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-26 Thread via cfe-commits
Sirraide wrote: Since we didn’t bring this up in the RFC, do we have any idea as to what we should do with `[[clang::assume]]`? My suggestion would be to keep the current semantics for `[[clang::assume]]` (and `__attribute__((assume))`, but probably *not* `[[assume]]`) iff the argument is a

[clang] [clang] Implement __builtin_popcountg (PR #82359)

2024-02-26 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: > @nickdesaulniers I am interested in implementing more builtins like this one. > :) Cool, I've filed: 1. https://github.com/llvm/llvm-project/issues/83075 2. https://github.com/llvm/llvm-project/issues/83076 Those would be helpful to have next, and I suspect as straigh

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: For the commit message and PR description, please consider: 1. using a subject that describes more of what the patch does, such as "[clang] fixes inf loop parsing fixed point literal" 2. put "Fixes #83050" in the commit body; when merged, github will auto close the corres

[clang] [Clang][HTO] Add clang attribute for propagating llvm-level information (PR #83059)

2024-02-26 Thread William Moses via cfe-commits
https://github.com/wsmoses updated https://github.com/llvm/llvm-project/pull/83059 >From c01b559836ca62648c5f95a6441888514347a1ea Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 26 Feb 2024 16:17:55 -0500 Subject: [PATCH 1/2] [Clang][HTO] Add clang attribute for propagating llvm-l

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread Nick Desaulniers via cfe-commits
@@ -0,0 +1,11 @@ +/// This is the regression test for https://github.com/llvm/llvm-project/issues/83050. +/// This just needs to compile. +// RUN: %clang_cc1 -x c++ -ffixed-point -S %s -o /dev/null -triple=x86_64-linux -ffixed-point +static constexpr unsigned short _Fract SQRT_F

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread via cfe-commits
@@ -0,0 +1,11 @@ +/// This is the regression test for https://github.com/llvm/llvm-project/issues/83050. +/// This just needs to compile. +// RUN: %clang_cc1 -x c++ -ffixed-point -S %s -o /dev/null -triple=x86_64-linux -ffixed-point +static constexpr unsigned short _Fract SQRT_F

[clang] [clang] Add fix for GH issue 83050 (PR #83071)

2024-02-26 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/83071 >From 306394b5e0386701f577ec2aa9a021492fbae734 Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Mon, 26 Feb 2024 14:11:45 -0800 Subject: [PATCH] [clang] Fixes inf loop parsing fixed point literal Clang was inc

[clang] [clang] Fixes inf loop parsing fixed point literal (PR #83071)

2024-02-26 Thread via cfe-commits
https://github.com/PiJoules edited https://github.com/llvm/llvm-project/pull/83071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fixes inf loop parsing fixed point literal (PR #83071)

2024-02-26 Thread via cfe-commits
https://github.com/PiJoules edited https://github.com/llvm/llvm-project/pull/83071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fixes inf loop parsing fixed point literal (PR #83071)

2024-02-26 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/83071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implementation of lerp intrinsic (PR #83077)

2024-02-26 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/83077 This is the start of implementing the lerp intrinsic https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-lerp Builtins.td - defines the builtin hlsl_intrinsics.h - defines the lerp api

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-26 Thread via cfe-commits
https://github.com/gulfemsavrun closed https://github.com/llvm/llvm-project/pull/75425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3d2a918 - [clang] Fixes inf loop parsing fixed point literal (#83071)

2024-02-26 Thread via cfe-commits
Author: PiJoules Date: 2024-02-26T14:47:16-08:00 New Revision: 3d2a918831e7bcf1285641ee446ac1640819819f URL: https://github.com/llvm/llvm-project/commit/3d2a918831e7bcf1285641ee446ac1640819819f DIFF: https://github.com/llvm/llvm-project/commit/3d2a918831e7bcf1285641ee446ac1640819819f.diff LOG:

[clang] [clang] Fixes inf loop parsing fixed point literal (PR #83071)

2024-02-26 Thread via cfe-commits
https://github.com/PiJoules closed https://github.com/llvm/llvm-project/pull/83071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 54cff50 - [TBAA] Add !tbaa.struct test with unnamed bitfields.

2024-02-26 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-02-26T22:50:50Z New Revision: 54cff50791dec977feb0badb74919d97dff5b859 URL: https://github.com/llvm/llvm-project/commit/54cff50791dec977feb0badb74919d97dff5b859 DIFF: https://github.com/llvm/llvm-project/commit/54cff50791dec977feb0badb74919d97dff5b859.diff LOG:

[clang] [Clang] Fix __has_cpp_attribute and C++11 attributes with arguments in C++03 (PR #83065)

2024-02-26 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: How about also enabling some existing C++11 tests for C++03 mode, too? E.g. `Preprocessor/has_attribute.cpp`, `SemaCXX/attr-declspec-ignored.cpp`, `SemaCXX/attr-gnu.cpp`, don't run in C++03 mode today but they could be made to. https://github.com/llvm/llvm-project/pull/83065

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922 >From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 25 Feb 2024 13:23:17 + Subject: [PATCH 1/6] [TBAA] Skip all bitfields when generating !tbaa.struct metadata.

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
@@ -294,18 +297,49 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, return false; const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD); +const CGRecordLayout &CGRL = CGTypes.getCGRecordLayout(RD); unsigned idx = 0; -for (RecordDecl::field

<    1   2   3   4   5   >