[PATCH] D132372: [X86][AVX512FP16] Add the missing const modifiers. NFCI

2022-08-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @RKSimon Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132372/new/ https://reviews.llvm.org/D132372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D132342: [X86][AVX512FP16] Relax limitation to AVX512FP16 intrinsics. NFCI

2022-08-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512fp16intrin.h:13 +#ifdef __SSE2__ + RKSimon wrote: > Doesn't this have to be the general case like in other places in the headers? > ``` > #if !(defined(_MSC_VER) || defined(__SCE__)) || __has_fe

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/Float16-arithmetic.c:42 _Float16 add2(_Float16 a, _Float16 b, _Float16 c) { return a + b + c; } Missing the same ternary operation test in complex tests? Comment at: clang/t

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/Float16-arithmetic.c:207 +// CHECK-NEXT:[[EXT:%.*]] = fpext half [[TMP0]] to float +// CHECK-NEXT:store float [[EXT]], ptr [[RETVAL]], align 2 +// CHECK-NEXT:[[TMP1:%.*]] = load half, ptr [[RETVAL]], al

[PATCH] D132342: [X86][AVX512FP16] Relax limitation to AVX512FP16 intrinsics. NFCI

2022-08-22 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG08388ad81e9d: [X86][AVX512FP16] Relax limitation to AVX512FP16 intrinsics. NFCI (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D132342: [X86][AVX512FP16] Relax limitation to AVX512FP16 intrinsics. NFCI

2022-08-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @RKSimon Comment at: clang/lib/Headers/immintrin.h:223 +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ +(defined(__AVX512VL__) && defined(__AVX512FP16__)) #include RKSimon wrote: > (style)

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/Float16-arithmetic.c:207 +// CHECK-NEXT:[[EXT:%.*]] = fpext half [[TMP0]] to float +// CHECK-NEXT:store float [[EXT]], ptr [[RETVAL]], align 2 +// CHECK-NEXT:[[TMP1:%.*]] = load half, ptr [[RETVAL]], al

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > I'm not sure what optimization you mean. Because the ABI returns 16-bit and > 32-bit FP values differently, there really isn't a way that we can return a > value without going through a truncation/extension cycle. I explained it to Zahira offline. I forgot we have dif

[PATCH] D113107: Support of expression granularity for _Float16.

2022-08-24 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D113107#3744782 , @rjmccall wrote: > In D113107#3744505 , @pengfei wrote: > >>> I'm not sure what optimization you mean. Because the ABI returns 16-bit and >>> 32-bit FP values differe

[PATCH] D132329: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

2022-08-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 455906. pengfei added a comment. Address Yuanke's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132329/new/ https://reviews.llvm.org/D132329 Files: clang/include/clang/Basic/BuiltinsX86.def clang

[PATCH] D132329: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

2022-08-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2472 + case BuiltinType::BFloat16: +mangleArtificialTagType(TTK_Struct, "__bf16", {"__clang"}); LuoYuanke wrote: > This looks irrelative to the patch. The use of `__bf16` in intri

[PATCH] D132742: [X86][BF16] Add type mangling for Windows

2022-08-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: FreddyYe, LuoYuanke, craig.topper, RKSimon, skan. Herald added a subscriber: StephenFan. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository

[PATCH] D133920: [X86][fastcall] Move capability check before free register update

2022-09-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 460991. pengfei marked 2 inline comments as done. pengfei added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133920/new/ https://reviews.llvm.org/D133920 Files: clang/doc

[PATCH] D133920: [X86][fastcall][vectorcall] Move capability check before free register update

2022-09-18 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 461071. pengfei added a comment. Address review comments. Thanks @rnk! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133920/new/ https://reviews.llvm.org/D133920 Files: clang/docs/ReleaseNotes.rst clang/li

[PATCH] D133920: [X86][fastcall][vectorcall] Move capability check before free register update

2022-09-18 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 461072. pengfei added a comment. Missing a `!`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133920/new/ https://reviews.llvm.org/D133920 Files: clang/docs/ReleaseNotes.rst clang/lib/CodeGen/TargetInfo.cp

[PATCH] D133920: [X86][fastcall][vectorcall] Move capability check before free register update

2022-09-19 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG46bb4b99ae9f: [X86][fastcall][vectorcall] Move capability check before free register update (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D132329: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

2022-09-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:2185 +addRegisterClass(MVT::v32bf16, &X86::VR512RegClass); +setOperationAction(ISD::BUILD_VECTOR, MVT::bf16, Custom); +setOperationAction(ISD::BUILD_VECTOR, MVT::v8bf16, Custom); --

[PATCH] D132329: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

2022-09-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/test/CodeGen/X86/avx512bf16-intrinsics-upgrade.ll:30 ; X64-NEXT:kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf] -; X64-NEXT:vcvtne2ps2bf16 %zmm1, %zmm0, %zmm0 {%k1} {z} # encoding: [0x62,0xf2,0x7f,0xc9,0x72,0xc1] +; X64-

[PATCH] D132329: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

2022-09-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/test/CodeGen/X86/avx512bf16-intrinsics-upgrade.ll:30 ; X64-NEXT:kmovd %edi, %k1 # encoding: [0xc5,0xfb,0x92,0xcf] -; X64-NEXT:vcvtne2ps2bf16 %zmm1, %zmm0, %zmm0 {%k1} {z} # encoding: [0x62,0xf2,0x7f,0xc9,0x72,0xc1] +; X64-

[PATCH] D131172: [clang][llvm][doc] Add more information for the ABI change in FP16

2022-09-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/docs/ReleaseNotes.rst:633 +- If you are using downstream runtimes that provide FP16 conversions, update +them with the new ABI. + mehdi_amini wrote: > Can you add a link to a documentation that describe the new ABI

[PATCH] D134337: [clang] [Driver] More flexible rules for loading default configs

2022-09-27 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/Driver/config-file3.c:33 +// RUN: ln -s %clang %t/testdmode/x86_64-unknown-linux-gnu-clang +// RUN: echo > %t/testdmode/x86_64-unknown-linux-gnu-clang++.cfg +// RUN: echo > %t/testdmode/x86_64-unknown-linux-gnu-clang-g++.cfg -

[PATCH] D134797: [X86][vectorcall] Make floating-type passed by value to match with MSVC

2022-09-28 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added a reviewer: rnk. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The passing format of floating-point types are different from vector when SSE registers exha

[PATCH] D134797: [X86][vectorcall] Make floating-type passed by value to match with MSVC

2022-10-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 464892. pengfei added a comment. Add HFA test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134797/new/ https://reviews.llvm.org/D134797 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/vectorca

[PATCH] D134797: [X86][vectorcall] Make floating-type passed by value to match with MSVC

2022-10-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:1858-1859 } -return getIndirectResult(Ty, /*ByVal=*/false, State); +bool ByVal = IsVectorCall && Ty->isFloatingType(); +return getIndirectResult(Ty, ByVal, State); } r

[PATCH] D134797: [X86][vectorcall] Make floating-type passed by value to match with MSVC

2022-10-05 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 465391. pengfei added a comment. Address @rnk's comments. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134797/new/ https://reviews.llvm.org/D134797 Files: clang/lib/CodeGen/TargetInfo.cpp clang/te

[PATCH] D134797: [X86][vectorcall] Make floating-type passed by value to match with MSVC

2022-10-05 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:1858-1859 } -return getIndirectResult(Ty, /*ByVal=*/false, State); +bool ByVal = IsVectorCall && Ty->isFloatingType(); +return getIndirectResult(Ty, ByVal, State); } r

[PATCH] D135930: [X86] Add AVX-NE-CONVERT instructions.

2022-10-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:781 +Builder.defineMacro("__AVXNECONVERT__"); + Builder.defineMacro("__AVXNECONVERT_SUPPORTED__"); if (HasAVXVNNI) LuoYuanke wrote: > Do we need it here? We don't need it. ==

[PATCH] D135930: [X86] Add AVX-NE-CONVERT instructions.

2022-10-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avxneconvertintrin.h:47 +static __inline__ __m128 __DEFAULT_FN_ATTRS128 +_mm_cvtneebf16_ps(const __m128bh *__A) { + return (__m128)__builtin_ia32_vcvtneebf162ps128((const __v8hi *)__A); I think the bf1

[PATCH] D132329: [X86][RFC] Using `__bf16` for AVX512_BF16 intrinsics

2022-10-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132329/new/ https://reviews.llvm.org/D132329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D135951: [X86][WIP] SUPPORT RAO-INT

2022-10-14 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. Herald added a subscriber: hiraditya. Herald added a project: All. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about these instructions, please refer to the lates

[PATCH] D135951: [X86][WIP] SUPPORT RAO-INT

2022-10-15 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 468020. pengfei added a comment. Add atomic operations lowering for RAO-INT instructions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135951/new/ https://reviews.llvm.org/D135951 Files: clang/docs/ReleaseN

[PATCH] D135951: [X86] SUPPORT RAO-INT

2022-10-15 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 468049. pengfei marked an inline comment as done. pengfei added a comment. Split atomic operations lowering into D136032 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135951/

[PATCH] D135951: [X86] SUPPORT RAO-INT

2022-10-15 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86.td:259 + "Support RAO-INT instructions", + [FeatureSSE2]>; def FeatureINVPCID : SubtargetFeature<"invpcid", "HasINVPCID", "true", --

[PATCH] D135951: [X86][1/2] SUPPORT RAO-INT

2022-10-15 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86.td:259 + "Support RAO-INT instructions", + [FeatureSSE2]>; def FeatureINVPCID : SubtargetFeature<"invpcid", "HasINVPCID", "true", --

[PATCH] D136040: [X86] Support PREFETCHI instructions

2022-10-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. Herald added a subscriber: hiraditya. Herald added a project: All. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For more details about these instructions, please refer to the lates

[PATCH] D136040: [X86] Support PREFETCHI instructions

2022-10-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 468080. pengfei added a comment. Fix lit fails. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136040/new/ https://reviews.llvm.org/D136040 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/Opti

[PATCH] D136040: [X86] Support PREFETCHI instructions

2022-10-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 468109. pengfei added a comment. Fix lit fails. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136040/new/ https://reviews.llvm.org/D136040 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Driver/Opti

[PATCH] D136040: [X86] Support PREFETCHI instructions

2022-10-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 468195. pengfei added subscribers: uweigand, t.p.northover. pengfei added a comment. 1. Address review comments; 2. Optimize prefetchit0/1 to prefetcht0/1 for non-rip address; 3. Add semacheck for prefetch write to instruction cache; 4. Fix a bug that set `rw`

[PATCH] D136040: [X86] Support PREFETCHI instructions

2022-10-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Driver/Options.td:4651 def mno_popcnt : Flag<["-"], "mno-popcnt">, Group; +def mprefetchi : Flag<["-"], "mprefetchi">, Group; +def mno_prefetchi : Flag<["-"], "mno-prefetchi">, Group; LuoYuanke wrote

[PATCH] D136040: [X86] Support PREFETCHI instructions

2022-10-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D136040#3862265 , @uweigand wrote: > In D136040#3862225 , @pengfei wrote: > >> 3. Add semacheck for prefetch write to instruction cache; >> >> I think the affected ARM and SystemZ tests

[PATCH] D139701: [Clang] Emit "min-legal-vector-width" attribute for X86 only

2022-12-18 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D139701#4004114 , @craig.topper wrote: > Please update the title Thanks for reminding! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139701/new/ https://reviews.llvm.org/D1397

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: RKSimon, arsenm. Herald added a project: All. pengfei requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. @arsenm raised a good question that we should use a flag guard. But I found i

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 484521. pengfei marked an inline comment as done. pengfei added a comment. Use FastMathFlagGuard instead, thanks @foad! In D140467#4010296 , @arsenm wrote: > Needs tests. I couldn’t find any for the base builtins eit

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14742 Builder.getFastMathFlags().setAllowReassoc(); -return Builder.CreateCall(F, {Ops[0], Ops[1]}); +Value *FAdd = Builder.CreateCall(F, {Ops[0], Ops[1]}); +Builder.getFastMathFlags() &=

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > If it exists it must be tested. > Every piece of code generation needs to be tested. Let me show you the number: $ grep -rho '__builtin_ia32\w\+' clang/test/CodeGen | sort|uniq |wc -l 337 $ grep -rho '_mm512_\w\+' clang/test/CodeGen | sort|uniq |wc -l 2304 Not

[PATCH] D140531: [X86] Add reduce_*_ep[i|u]8/16 series intrinsics.

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512vlbwintrin.h:2806-2814 +/* Vector-reduction arithmetic accepts vectors as inputs and produces scalars as + * outputs. This class of vector operation forms the basis of many scientific + * computations. In vector-

[PATCH] D140531: [X86] Add reduce_*_ep[i|u]8/16 series intrinsics.

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/avx512vlbw-reduceIntrin.c:1 +// RUN: %clang_cc1 -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s + ---

[PATCH] D140531: [X86] Add reduce_*_ep[i|u]8/16 series intrinsics.

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/avx512vlbw-reduceIntrin.c:1 +// RUN: %clang_cc1 -ffreestanding %s -O0 -triple=x86_64-apple-darwin -target-feature +avx512bw -target-feature +avx512vl -emit-llvm -o - -Wall -Werror | FileCheck %s + ---

[PATCH] D140531: [X86] Add reduce_*_ep[i|u]8/16 series intrinsics.

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. This revision is now accepted and ready to land. LGTM. Please wait some days for other reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140531/new/ https://reviews.llvm.org/D140531 _

[PATCH] D139784: [Doc] Refactor descriptions of `min-legal-vector-width`

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 484805. pengfei added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Move doc to comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139784/new/ https://reviews.llvm.org/D

[PATCH] D139701: [Clang] Emit "min-legal-vector-width" attribute for X86 only

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/docs/LangRef.rst:2235-2241 -``"min-legal-vector-width"=""`` -This attribute indicates the minimum legal vector width required by the -calling convension. It is the maximum width of vector arguments and -returnings in the

[PATCH] D139784: [Doc] Refactor descriptions of `min-legal-vector-width`

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:502-504 + // This attribute is intended for X86 backend use only. The "min legal" in the + // name means the minimum width in bits that vector types have must be treated + // as legal types by c

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 484826. pengfei added a comment. Add test case to check FastMathFlagGuard works. > Tests don't exist for users, they exist for compiler developers... > I agree with @arsenm. At least for clang irgen, we should have good test > coverage. You are right. Added

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 484838. pengfei marked 2 inline comments as done. pengfei added a comment. Address review comments. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140467/new/ https://reviews.llvm.org/D140467 Files: c

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/builtins-x86-reduce.c:8 +} + +// CHECK: fadd arsenm wrote: > Should test the builtins from both sets Do you mean this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 485016. pengfei added a comment. Add fmul, fmin and fmax cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140467/new/ https://reviews.llvm.org/D140467 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/

[PATCH] D140467: [X86][Reduce] Preserve fast math flags when change it. NFCI

2022-12-23 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG073cc29e04b7: [X86][Reduce] Preserve fast math flags when change i

[PATCH] D140950: [X86] Support -march=emeraldrapids

2023-01-05 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140950/new/ https://reviews.llvm.org/D140950

[PATCH] D135937: [X86] Support -march=raptorlake, meteorlake

2022-11-01 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:12940-12941 .Case(STR, {2u, static_cast(llvm::X86::ENUM)}) +#define X86_CPU_SUBTYPE_ALIAS(ENUM, STR) \ + .Case(STR, {2u, static_cast(llvm::X86::ENUM)}) #include

[PATCH] D135937: [X86] Support -march=raptorlake, meteorlake

2022-11-02 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135937/new/ https://reviews.llvm.org/D135937

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added a reviewer: nickdesaulniers. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I intended to not adding test case since it is NFC to most modern X86 targets. F

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D136919#3904925 , @RKSimon wrote: > What are the rules on this? Do we just handle this as an ABI breaking change > and document it in the release notes - or do we need to provide any > auto-upgrade path (with a warning?)? TB

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D136919#3905024 , @RKSimon wrote: > Do you think this patch needs to be expanded to handle ARM/AArch64/NVPTX - > all of which override getBFloat16Mangling in similar ways? I thought of that. It would be great if we can make c

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 472916. pengfei added a comment. Fix lit fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137317/new/ https://reviews.llvm.org/D137317 Files: clang/lib/Basic/Targets/X86.h Index: clang/lib/Basic/Targets

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei planned changes to this revision. pengfei added a comment. In D136919#3906159 , @rjmccall wrote: > In D136919#3906133 , @rjmccall > wrote: > >> We talked about this on the Itanium list, and as currently s

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686 for `-fcf-protection`

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @nickdesaulniers and @craig.topper! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137317/new/ https://reviews.llvm.org/D137317 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686 for `-fcf-protection`

2022-11-03 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG525167829727: [X86][CET] Add Diags for targets pre to i686 for `-fcf-protection` (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137317/

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D136919#3907974 , @stuij wrote: > As for Arm/AAch64, we're still assessing the amount of pain we'd cause with > the name change, but we don't have an issue with letting go of storage-only. Thanks @stuij. Indeed! ABI breaking

[PATCH] D136846: [Driver] Add -fsample-profile-use-profi

2022-11-07 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG13f83365cdb5: [Driver] Add -fsample-profile-use-profi (authored by HaoyuZhang, committed by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136846/ne

[PATCH] D137153: [X86] Support -march=sierraforest, grandridge, graniterapids.

2022-11-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/include/llvm/Support/X86TargetParser.def:94 +X86_CPU_SUBTYPE(AMDFAM19H_ZNVER4,"znver4") +X86_CPU_SUBTYPE(INTEL_COREI7_SIERRAFOREST, "sierraforest") +X86_CPU_SUBTYPE(INTEL_COREI7_GRANITERAPIDS, "graniterapids") ---

[PATCH] D137153: [X86] Support -march=sierraforest, grandridge, graniterapids.

2022-11-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137153/new/ https://reviews.llvm.org/D137153

[PATCH] D143094: [clang] Change AMX macros to match names from GCC

2023-02-02 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. The change makes sense. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143094/new/ https://reviews.llvm.org/D143094 ___ cfe-commits mailing l

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2022-06-10 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/test/CodeGen/X86/fpclamptosat_vec.ll:605 +; CHECK-NEXT:.cfi_def_cfa_offset 80 +; CHECK-NEXT:movss %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill +; CHECK-NEXT:movss %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2022-06-11 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2d2da259c872: [X86][RFC] Enable `_Float16` type support on X86 following the psABI (authored by pengfei). Changed prior to commit: https://reviews

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2022-06-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D107082#3576355 , @mehdi_amini wrote: > This broke the bot here: > https://lab.llvm.org/buildbot/#/builders/61/builds/27616 > > The cmake invocation includes some GPU specific options that you can omit > (`-DMLIR_ENABLE_CUDA

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2022-06-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/test/CodeGen/X86/fpclamptosat_vec.ll:605 +; CHECK-NEXT:.cfi_def_cfa_offset 80 +; CHECK-NEXT:movss %xmm2, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill +; CHECK-NEXT:movss %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 4-byte Spill

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/docs/ReleaseNotes.rst:491 +- Support for ``AVX512-FP16`` instructions has been added. +- Support for ``_Float16`` type has been added. This line doesn't need anymore. Comment at: clang/lib/Basi

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGExprComplex.cpp:896 + +ComplexPairTy ComplexExprEmitter::EmitPromoted(const Expr *E) { + if (auto *BinOp = dyn_cast(E->IgnoreParens())) { rjmccall wrote: > pengfei wrote: > > rjmccall wrote: > > > za

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGExprComplex.cpp:896 + +ComplexPairTy ComplexExprEmitter::EmitPromoted(const Expr *E) { + if (auto *BinOp = dyn_cast(E->IgnoreParens())) { zahiraam wrote: > pengfei wrote: > > rjmccall wrote: > > > pe

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > Supporting the lowering in the backend is sensible in order to support > -fexcess-precision=16, because I agree that the most reasonable IR output in > that configuration is to simply generate half operations. But under > -fexcess-precision=32, I do not want the front

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. @zahiraam, community requires to enable the `_Float16` support in FE, see https://discourse.llvm.org/t/how-to-build-compiler-rt-for-new-x86-half-float-abi/63366 Is there any blocking issue to land it soon? Otherwise, we can split the changes in `X86.cpp`, `LanguageExtens

[PATCH] D113107: Support of expression granularity for _Float16.

2022-06-24 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. @zahiraam I'm going to enable the FE support when I reland the backend patch. Community people report correctness issue due to the ABI issue in compiler-rt. See https://github.com/llvm/llvm-project/issues/56204 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1131

[PATCH] D128571: [X86] Support `_Float16` on SSE2 and up

2022-06-24 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: zahiraam, rjmccall, bkramer, alexfh. Herald added a subscriber: jsji. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is split from D113107

[PATCH] D107082: [X86][RFC] Enable `_Float16` type support on X86 following the psABI

2022-06-24 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. I'll take care next time. Thanks @MaskRay ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107082/new/ https://reviews.llvm.org/D107082 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D128571: [X86] Support `_Float16` on SSE2 and up

2022-06-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 440016. pengfei marked 3 inline comments as done. pengfei added a comment. Address review comments. Thanks @rjmccall ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128571/new/ https://reviews.llvm.org/D128571

[PATCH] D126137: [X86] Add support for `-mharden-sls=all`

2022-05-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 432247. pengfei marked 6 inline comments as done. pengfei added a comment. Address @nickdesaulniers 's comments. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126137/new/ https://reviews.

[PATCH] D126137: [X86] Add support for `-mharden-sls=all`

2022-05-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86AsmPrinter.cpp:346 + auto IsIndirectTailCall = [I, &Desc]() { +return Desc.isCall() && Desc.isReturn() && Desc.isBarrier() && + !I->getOperand(0).isGlobal(); nickdesaulni

[PATCH] D107082: [X86][RFC][WIP] Enable `_Float16` type support on X86 following the psABI

2022-05-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 432298. pengfei marked 2 inline comments as done. pengfei added a comment. Address Shengchen's review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107082/new/ https://reviews.llvm.org/D107082 Files:

[PATCH] D107082: [X86][RFC][WIP] Enable `_Float16` type support on X86 following the psABI

2022-05-26 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:136 -* ... +* Support ``half`` type on SSE2 and above targets. skan wrote: > Just for curiosity, why is SSE2? We are following to GCC. The more background about why chosing SSE2 can be fou

[PATCH] D126137: [X86] Add support for `-mharden-sls=all`

2022-05-27 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/X86.cpp:257 +} else if (Scope != "none") { + D.Diag(diag::err_invalid_sls_hardening) << Scope << A->getAsString(Args); +} nickdesaulniers wrote: > MaskRay wrote: > > The conv

[PATCH] D126137: [X86] Add support for `-mharden-sls=all`

2022-05-27 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 432511. pengfei marked 5 inline comments as done. pengfei added a comment. Address @MaskRay 's comments. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126137/new/ https://reviews.llvm.org

[PATCH] D126511: [ARM][AArch64] Change -mharden-sls= to use err_drv_unsupported_option_argument

2022-05-27 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. This is also fine to me. I'll rebase on it if @nickdesaulniers accept this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126511/new/ https://reviews.llvm.org/D126511 ___ cfe-com

[PATCH] D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`

2022-05-27 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 432692. pengfei added a comment. 1. Revert the change to clang/docs/ClangCommandLineReference.rst 2. Update missing options 3. Rebase on D126511 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`

2022-05-27 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 432698. pengfei marked 6 inline comments as done. pengfei added a comment. Address review comments. Thanks @MaskRay for the thorough review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126137/new/ https://rev

[PATCH] D113107: Support of expression granularity for _Float16.

2022-05-31 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:242 HasAVX512FP16 = true; HasFloat16 = true; + HasLegalHalfType = true; This can be removed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113107/new/ https:/

[PATCH] D126137: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]`

2022-05-31 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa2ea5b496bcd: [X86] Add support for `-mharden-sls=[none|all|return|indirect-jmp]` (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126137

[PATCH] D127050: [Clang][FP16] Add 4 builtins for _Float16

2022-06-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: rjmccall, erichkeane, LuoYuanke. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We are lacking builtins support for `_Float16`. In most cases, we

[PATCH] D127050: [Clang][FP16] Add 4 builtins for _Float16

2022-06-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:145 BUILTIN(__builtin_huge_vall, "Ld", "nc") +BUILTIN(__builtin_huge_valf16, "x", "nc") BUILTIN(__builtin_huge_valf128, "LLd", "nc") LuoYuanke wrote: > Is the builtin sorted in al

[PATCH] D127050: [Clang][FP16] Add 4 builtins for _Float16

2022-06-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/builtin_Float16.c:7 +void test_float16_builtins(void) { + volatile _Float16 res; + LuoYuanke wrote: > Is _Float16 a legal type for target armv7a and aarch64? Yes, see https://clang.llvm.org/docs/Lang

[PATCH] D127050: [Clang][FP16] Add 4 builtins for _Float16

2022-06-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/builtin_Float16.c:7 +void test_float16_builtins(void) { + volatile _Float16 res; + LuoYuanke wrote: > pengfei wrote: > > LuoYuanke wrote: > > > Is _Float16 a legal type for target armv7a and aarch64?

<    1   2   3   4   5   6   >