[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-08 Thread Maksim Levental via cfe-commits
@@ -6532,6 +6534,34 @@ TEST(APFloatTest, Float8E5M2ToDouble) { EXPECT_TRUE(std::isnan(QNaN.convertToDouble())); } +TEST(APFloatTest, Float8E4M3ToDouble) { + APFloat One(APFloat::Float8E4M3(), "1.0"); + EXPECT_EQ(1.0, One.convertToDouble()); + APFloat Two(APFloat::Float8E4

[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-08 Thread Maksim Levental via cfe-commits
@@ -460,10 +460,10 @@ class alignas(void *) Stmt { unsigned : NumExprBits; static_assert( -llvm::APFloat::S_MaxSemantics < 16, -"Too many Semantics enum values to fit in bitfield of size 4"); +llvm::APFloat::S_MaxSemantics < 32, +"Too ma

[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-08 Thread Maksim Levental via cfe-commits
@@ -136,6 +136,7 @@ static constexpr fltSemantics semIEEEquad = {16383, -16382, 113, 128}; static constexpr fltSemantics semFloat8E5M2 = {15, -14, 3, 8}; static constexpr fltSemantics semFloat8E5M2FNUZ = { 15, -15, 3, 8, fltNonfiniteBehavior::NanOnly, fltNanEncoding::Nega

[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-08 Thread Maksim Levental via cfe-commits
https://github.com/makslevental commented: Man talk about boiler plate 😄. Anyway this all looks basically fine. Except for the one ask about splitting this up I think I can approve (modulo the tests passing). I'll double check tomorrow on a bigger screen (currently on my laptop) so I can make

[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-08 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/97118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-03 Thread Maksim Levental via cfe-commits
makslevental wrote: Hey @apivovarov I just wanted to say my bad for not getting to this yet - I'm buried at work but I haven't forgotten. If it's hipri I can find someone else to review. Otherwise ~couple of days I think and I'll be clear to review. https://github.com/llvm/llvm-project/pull/97

[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-01 Thread Maksim Levental via cfe-commits
makslevental wrote: > Just rebased and changed the commit message to match new PR title - `[MLIR] > Add f8E4M3 IEEE 754 type` Ah I forgot you need actually change the base but just rebase to get the commits in the other PR to disappear (which is what I wanted for ease of review). No big deal

[clang] [llvm] [mlir] [MLIR] Add f8E4M3 IEEE 754 type (PR #97118)

2024-07-01 Thread Maksim Levental via cfe-commits
makslevental wrote: Hey @apivovarov I think this needs a rebas? https://github.com/llvm/llvm-project/pull/97118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] Add f8E4M3 IEEE 754 type (PR #97118)

2024-06-28 Thread Maksim Levental via cfe-commits
makslevental wrote: Ah so this is the reason for the previous PR :) https://github.com/llvm/llvm-project/pull/97118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-16 Thread Maksim Levental via cfe-commits
https://github.com/makslevental approved this pull request. There you go - diligently reviewed using GitHub 's fantastic UI. ![Screenshot_20240517_011154_com android chrome](https://github.com/llvm/llvm-project/assets/5657668/ece87aff-4c44-4f07-8176-1adeaa4ff32e) https://github.com/llvm/llvm-

[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-16 Thread Maksim Levental via cfe-commits
makslevental wrote: It's a `sed s/== None/is None/g` - what is there to review? 10 separate PRs for the same exact `sed` costs more in commit noise (and effort on the part of @e-kwsm) than one solid, patient, review here. https://github.com/llvm/llvm-project/pull/91857

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-11-02 Thread Maksim Levental via cfe-commits
https://github.com/makslevental closed https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
@@ -257,14 +256,9 @@ const char *const Runtimes = R"( void __clang_Interpreter_SetValueNoAlloc(void*, void*, void*, long double); void __clang_Interpreter_SetValueNoAlloc(void*,void*,void*,unsigned long long); template -void __clang_Interpreter_SetValueCopyArr

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From 891cdd5ceea279362c3df221fd4ae73c142b2f7e Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cpp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
makslevental wrote: @vgvassilev this seems acceptable? https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From 940da2de0fc92e8e0da64fd35ad08effb6093447 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cpp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From 737bef4f36139f0347e9ab58838e41aadbb45d16 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cpp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From f2d35a0f0356d5ea570019bc02558bd5fc143afb Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/3] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-19 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/3] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
https://github.com/makslevental edited https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-15 Thread Maksim Levental via cfe-commits
@@ -275,7 +274,14 @@ Interpreter::create(std::unique_ptr CI) { if (Err) return std::move(Err); - auto PTU = Interp->Parse(Runtimes); + std::string runtimes = ""; + if (llvm::Triple(llvm::sys::getProcessTriple()).isOSDarwin()) +runtimes += "#include \n"; --

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/3] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include makslevental

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/2] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cp

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -20,4 +20,6 @@ auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast makslevental wrote: This was to test (since `` transitively includes ``). https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include makslevental

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/69072 On Mac M1, if you load something that transitively loads `#include `, it will fail because ``` In file included from <<< inputs >>>:1: In file included from input_line_22:1: In file included from /Applica