Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
https://github.com/tbaederr closed
https://github.com/llvm/llvm-project/pull/68069
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Timm =?utf-8?q?B=C3=A4der?=
Message-ID:
In-Reply-To:
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/68069
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
Timm =?utf-8?q?Bäder?=
Message-ID:
In-Reply-To:
https://github.com/tbaederr updated
https://github.com/llvm/llvm-project/pull/68069
>From ae2201c2bb82ae26030800c62b3a0f93e2ec49a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Tue, 3 Oct 2023 08:35:57 +0200
Subject: [PATCH
@@ -3,6 +3,14 @@
// RUN: %clang_cc1 -std=c++11 -fms-extensions -verify=ref %s
// RUN: %clang_cc1 -std=c++20 -fms-extensions -verify=ref %s
+
+constexpr _BitInt(2) A = 0;
+constexpr _BitInt(2) B = A + 1;
+constexpr _BitInt(2) C = B + 1; // expected-warning {{from 2 to -2}} \
--
https://github.com/tbaederr updated
https://github.com/llvm/llvm-project/pull/68069
>From ae2201c2bb82ae26030800c62b3a0f93e2ec49a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Tue, 3 Oct 2023 08:35:57 +0200
Subject: [PATCH] [clang][Interp] Add basic support for _BitInt
Ma
https://github.com/tbaederr updated
https://github.com/llvm/llvm-project/pull/68069
>From c93895b7e1b0727327178d73adc93cb988ad3966 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?=
Date: Tue, 3 Oct 2023 08:35:57 +0200
Subject: [PATCH] [clang][Interp] Add basic support for _BitInt
Ma
@@ -582,11 +598,21 @@ def CastIntegralFloating : Opcode {
// Cast a floating to an integer type
def CastFloatingIntegral : Opcode {
- let Types = [AluTypeClass];
+ let Types = [FixedSizeIntegralTypes];
tbaederr wrote:
The type classes for these get kinda co
@@ -1601,6 +1617,46 @@ bool CastFloatingIntegral(InterpState &S, CodePtr OpPC) {
}
}
+static inline bool CastFloatingIntegralAP(InterpState &S, CodePtr OpPC,
+ uint32_t BitWidth) {
+ const Floating &F = S.Stk.pop();
+
+ APSInt Resul
llvmbot wrote:
@llvm/pr-subscribers-clang
Changes
Make sure we pass the expected bitwidth around when casting to IntAP/IntAPS and
move the tests to their own file.
This makes it easier to test the `IntegralAP` code for different bit widths
than 128.
---
Full diff: https://github.com/llv
https://github.com/tbaederr created
https://github.com/llvm/llvm-project/pull/68069
Make sure we pass the expected bitwidth around when casting to IntAP/IntAPS and
move the tests to their own file.
This makes it easier to test the `IntegralAP` code for different bit widths
than 128.
>From d7
10 matches
Mail list logo