[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-06 Thread Alex MacLean via cfe-commits
AlexMaclean wrote: > Can you add some tests to demonstrate that this patch will enable more > optimizations in some real-world applications? I can extend the existing test cases to make them more elaborate/real-looking, but I'm guessing that would not qualify as "real-world". This patch is

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/97762 >From c2913d1074c5bfa771379d68e9ba728a3d1d1ce5 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 1 Jul 2024 17:06:56 + Subject: [PATCH 1/4] [ValueTracking] use KnownBits to compute fpclass from

[clang] [llvm] [NVPTX] Support inline asm with 128-bit operand in NVPTX backend (PR #97113)

2024-07-01 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean closed https://github.com/llvm/llvm-project/pull/97113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fixup cuda-builtin-vars.cu broken in IntrRange change (PR #94639)

2024-06-06 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean closed https://github.com/llvm/llvm-project/pull/94639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-06 Thread Alex MacLean via cfe-commits
@@ -6,21 +6,21 @@ __attribute__((global)) void kernel(int *out) { int i = 0; - out[i++] = threadIdx.x; // CHECK: call noundef i32 @llvm.nvvm.read.ptx.sreg.tid.x() - out[i++] = threadIdx.y; // CHECK: call noundef i32 @llvm.nvvm.read.ptx.sreg.tid.y() - out[i++] =

[clang] fixup cuda-builtin-vars.cu broken in IntrRange change (PR #94639)

2024-06-06 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean created https://github.com/llvm/llvm-project/pull/94639 None >From 227c36f7261854a1b6f8fb12fd902ffa7380be0d Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Thu, 6 Jun 2024 16:36:19 + Subject: [PATCH] fixup cuda-builtin-vars.cu broken in IntrRange change

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
@@ -139,24 +138,23 @@ define ptx_device i32 @test_ctaid_w() { define ptx_device i32 @test_nctaid_y() { ; CHECK: mov.u32 %r{{[0-9]+}}, %nctaid.y; -; RANGE: call i32 @llvm.nvvm.read.ptx.sreg.nctaid.y(), !range ![[GRID_SIZE_YZ:[0-9]+]] +; RANGE: call range(i32 1, 65536) i32

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/94422 >From 708374e03f1bf70006f2472f19edad1bd621e2d6 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 3 Jun 2024 16:46:36 + Subject: [PATCH 1/4] [NVPTX] Revamp NVVMIntrRange pass ---

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
@@ -0,0 +1,60 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --version 5 +; RUN: opt < %s -S -mtriple=nvptx-nvidia-cuda -mcpu=sm_20 -passes=nvvm-intr-range | FileCheck %s + +define i32 @test_maxntid() { +; CHECK-LABEL:

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
@@ -128,6 +128,15 @@ bool findOneNVVMAnnotation(const GlobalValue *gv, const std::string , return true; } +static std::optional +findOneNVVMAnnotation(const GlobalValue , const std::string ) { + unsigned RetVal; + bool Found = findOneNVVMAnnotation(, PropName, RetVal); +

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/94422 >From 708374e03f1bf70006f2472f19edad1bd621e2d6 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 3 Jun 2024 16:46:36 + Subject: [PATCH 1/3] [NVPTX] Revamp NVVMIntrRange pass ---

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
@@ -1,50 +1,51 @@ -//===- NVVMIntrRange.cpp - Set !range metadata for NVVM intrinsics ===// +//===- NVVMIntrRange.cpp - Set range attributes for NVVM intrinsics ---===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/94422 >From 708374e03f1bf70006f2472f19edad1bd621e2d6 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 3 Jun 2024 16:46:36 + Subject: [PATCH 1/2] [NVPTX] Revamp NVVMIntrRange pass ---

[clang] [llvm] [NVPTX] Revamp NVVMIntrRange pass (PR #94422)

2024-06-05 Thread Alex MacLean via cfe-commits
https://github.com/AlexMaclean updated https://github.com/llvm/llvm-project/pull/94422 >From 708374e03f1bf70006f2472f19edad1bd621e2d6 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Mon, 3 Jun 2024 16:46:36 + Subject: [PATCH] [NVPTX] Revamp NVVMIntrRange pass ---