[PATCH] D147867: [Windows SEH] Fix ehcleanup crash for Windows -EHa

2023-04-11 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa3f688422c44: [Windows SEH] Fix ehcleanup crash for Windows -EHa (authored by pengfei). Changed prior to commit: https://reviews.llvm.org/D147867?vs=511935&id=512662#toc Repository: rG LLVM Github Mo

[PATCH] D148021: [Headers][doc] Add FMA intrinsic descriptions

2023-04-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Headers/fmaintrin.h:22 +/// Computes a multiply-add of 128-bit vectors of [4 x float]. +///For each element, computes (__A * __B) + __C . +//

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-19 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Great work! Thanks for the patch! Comment at: clang/include/clang/AST/ASTContext.h:1102 CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON - CanQualType BFloat16Ty; + CanQualType BFloat16Ty; // ISO/IEC/IEEE 60559. CanQualType Float16Ty; // C11 ex

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-19 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Basic/Targets/X86.cpp:381 HasBFloat16 = SSELevel >= SSE2; codemzs wrote: > rjmccall wrote: > > pengfei wrote: > > > I'm not sure if I understand the meaning of `HasFullBFloat16`. If it is > > > used f

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-19 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa4f366dcd85c: Reland "[Driver] Support multi /guard: options" (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150645/new/ https://revie

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Sorry for the back and forth! I just want to add a `:` after `warning`, but I forgot to amend it in the first reland.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150645/new/ https://reviews.llvm.org/D150645 ___

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

2023-05-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei abandoned this revision. pengfei added a comment. Abandon this in favor of D150913 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136919/new/ https://reviews.llvm.org/D136919 _

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150913/new/ https://reviews.llvm.org/D150913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D150913: [Clang][Bfloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-24 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/docs/LanguageExtensions.rst:852 ``double`` when passed to ``printf``, so the programmer must explicitly cast it to ``double`` before using it with an ``%f`` or similar specifier. rjmccall wrote: > Suggested re

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/docs/LanguageExtensions.rst:852 ``double`` when passed to ``printf``, so the programmer must explicitly cast it to ``double`` before using it with an ``%f`` or similar specifier. rjmccall wrote: > pengfei wrot

[PATCH] D150114: [Headers][doc] Add "add/sub/mul" intrinsic descriptions to avx2intrin.h

2023-05-25 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 except for a possible typo. Comment at: clang/lib/Headers/avx2intrin.h:412 +///vectors of [16 x i16] and returns the lower 16 bits of each difference +///in an

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/docs/LanguageExtensions.rst:852 ``double`` when passed to ``printf``, so the programmer must explicitly cast it to ``double`` before using it with an ``%f`` or similar specifier. rjmccall wrote: > codemzs wrot

[PATCH] D151509: [Driver][X86] Reject unsupported value for -mabi=

2023-05-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/Driver/x86-mabi.c:6 + +// CHECK-NOT: {{error|warning}}: +// ERR: error: unsupported option '-mabi=' for target '{{.*}}' What's the expected result for e.g. `x86_64-pc-windows-gnu/mingw/cygnus` ? Repository:

[PATCH] D151509: [Driver][X86] Reject unsupported value for -mabi=

2023-05-25 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. Comment at: clang/test/Driver/x86-mabi.c:6 + +// CHECK-NOT: {{error|warning}}: +// ERR: error: unsupported option '-mabi=' for target '{{.*}}' MaskRa

[PATCH] D150913: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and extend excess precision support.

2023-05-26 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 rGe62175736551: [Clang][BFloat16] Upgrade __bf16 to arithmetic type, change mangling, and… (authored by codemzs, committed by pengfei). Changed prior

[PATCH] D151610: [Docs] Fix Sphinx documentation formatting issues in LanguageExtensions.rst

2023-05-27 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151610/new/ https://reviews.llvm.org/D151610 ___ cfe-commits mailing list cfe-commit

[PATCH] D151610: [Docs] Fix Sphinx documentation formatting issues in LanguageExtensions.rst

2023-05-27 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 rGdd2e681612f1: [Docs] Fix Sphinx documentation formatting issues in LanguageExtensions.rst (authored by codemzs, committed by pengfei). Changed prior

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-29 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D150645#4379536 , @glandium wrote: > In D150645#4351266 , @aeubanks > wrote: > >> this causes `./build/rel/bin/clang-cl /c /tmp/a.cc /Fo/tmp/a >> /guard:cf,nochecks` to go from no war

[PATCH] D151749: [Headers][doc] Add "shuffle-like" intrinsic descriptions to avx2intrin.h

2023-05-31 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151749/new/ https://reviews.llvm.org/D151749 ___ cfe-commits mailing list cfe-commit

[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

2023-02-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/docs/LangRef.rst:2166 + +If the mode is ``"dynamic"``, the behavior is derived from the +dynamic state of the floating-point environment. Transformations 1. Does it mean users must specify `dynamic` when the

[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:33955 const SmallVectorImpl &AsmStrs, unsigned OpNo) const { - StringRef InstrStr = getInstrStrFromOpNo(AsmStrs, OpNo); - - if (InstrStr.contains("call")) -return true; - - return false

[PATCH] D149920: ms inline asm: recognize case-insensitive JMP and CALL as TargetLowering::C_Address

2023-05-04 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/D149920/new/ https://reviews.llvm.org/D149920

[PATCH] D150114: [Headers][doc] Add "add/sub/mul" intrinsic descriptions to avx2intrin.h

2023-05-15 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx2intrin.h:1043 +///corresponding byte of the 256-bit integer vector result (overflow is +///ignored). For each byte, computes result = __a - __b . +/// It better to move it to `\code{.operat

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: rnk, arlosi, thakis, ajpaverd. Herald added a project: All. pengfei requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-16 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 rG3b6f7e45a209: [Driver] Support multi /guard: options (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-16 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @rnk ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150645/new/ https://reviews.llvm.org/D150645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 523256. pengfei added a comment. Sorry for the noise, I guess I missed a `A->claim()` here. Updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150645/new/ https://reviews.llvm.org/D150645 Files: clang/li

[PATCH] D150645: [Driver] Support multi /guard: options

2023-05-19 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 523745. pengfei added a comment. In D150645#4353408 , @aeubanks wrote: > if you add a test for the repro, relanding lgtm Thanks, done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D149205: [Headers][doc] Add "gather" intrinsic descriptions to avx2intrin.h

2023-04-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. LGTM with one nit. Comment at: clang/lib/Headers/avx2intrin.h:942 +/// +/// \code +/// FOR element := 0 to 1 Use `\code{.operation}` please, the same below. Our internal tool will recognize this pattern.

[PATCH] D139627: clang/X86: Don't emit "min-legal-vector-width"="0"

2022-12-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei requested changes to this revision. pengfei added a comment. This revision now requires changes to proceed. The use of `min-legal-vector-width` doesn't look great to me either. I'm more than glad if we can remove it totally without any user perceivable affects. I cannot agree with this ch

[PATCH] D139627: clang/X86: Don't emit "min-legal-vector-width"="0"

2022-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D139627#3982387 , @arsenm wrote: > In D139627#3982385 , @arsenm wrote: > >>> [1] `"min-legal-vector-width" = "0"` was clear to indicate there are only >>> scalar operations. >> >> It's

[PATCH] D139627: clang/X86: Don't emit "min-legal-vector-width"="0"

2022-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D139627#3982381 , @craig.topper wrote: > In D139627#3982349 , @jdoerfert > wrote: > >> Isn't this (inherently) X86 specific? > > Yes it is. We could qualify the attribute emission wit

[PATCH] D139701: [Clang] Don't emit "min-legal-vector-width"="0" for AMDGPU

2022-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: craig.topper, arsenm, RKSimon. Herald added subscribers: kosarev, StephenFan, jdoerfert, kerbowa, tpr, dstuttard, yaxunl, jvesely, kzhuravl. Herald added a project: All. pengfei requested review of this revision. Herald added subscribers: cfe

[PATCH] D136176: Implement support for option 'fexcess-precision'.

2022-12-14 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/fexcess-precision.c:89 +// CHECK-EXT-NEXT:[[EXT1:%.*]] = fpext half [[TMP1]] to float +// CHECK-EXT-NEXT:[[MUL:%.*]] = fmul float [[EXT]], [[EXT1]] +// CHECK-EXT-NEXT:[[TMP2:%.*]] = load half, ptr [[C_A

[PATCH] D139701: [Clang] Don't emit "min-legal-vector-width"="0" for AMDGPU

2022-12-17 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D139701#3993446 , @arsenm wrote: > TargetCodeGenInfo::setTargetAttributes already exists as a place for targets > to emit their custom attributes, x86 could emit it there It's an attractive suggestion. But it's not easy to mo

[PATCH] D117791: [X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs

2022-01-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added inline comments. Comment at: clang/lib/Headers/avx512fintrin.h:31 + * appear in the interface though. */ +typedef signed char __v64qs __attribute__((__vector_size__(64))); + Do we need to declare explicit `signed`?

[PATCH] D117791: [X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs

2022-01-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512fintrin.h:31 + * appear in the interface though. */ +typedef signed char __v64qs __attribute__((__vector_size__(64))); + craig.topper wrote: > pengfei wrote: > > Do we need to declare explicit `si

[PATCH] D117798: [X86] Remove __builtin_ia32_pmax/min intrinsics and use generic __builtin_elementwise_max/min

2022-01-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added inline comments. Comment at: clang/lib/Headers/avx512bwintrin.h:894 return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M, (__v64qi)_mm512_min_epu8(__A, __B),

[PATCH] D116070: [X86] Enable ibt-seal optimization when LTO is used in Kernel

2022-01-20 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82af95029ec9: [X86] Enable ibt-seal optimization when LTO is used in Kernel (authored by joaomoreira, committed by pengfei). Herald added a project: clang. Herald added a subscriber: cfe-commits. Reposito

[PATCH] D117881: [X86] Remove avx512f integer and/or/xor/min/max reduction intrinsics and use generic equivalents

2022-01-21 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. What's the difference between `__builtin_reduce_and` and generating a `Intrinsic::vector_reduce_and` in code? If this is just a simplification, why can't be applied to `add` too? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D117881: [X86] Remove avx512f integer and/or/xor/min/max reduction intrinsics and use generic equivalents

2022-01-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei accepted this revision. pengfei added a comment. I see. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117881/new/ https://reviews.llvm.org/D117881 ___ cfe-commits mailing list cfe-commits

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-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 rG37d1d02200b9: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match… (authored by pengfei). Repository: rG LLVM Github Mono

[PATCH] D118527: [X86] Promote default mtune from generic to sandybridge

2022-01-28 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: craig.topper, spatel, erichkeane, RKSimon, andrew.w.kaylor. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We use `x86-64` as default target-cpu for a long time. It may be ob

[PATCH] D118527: [X86] Promote default mtune from generic to sandybridge

2022-01-28 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D118527#3281488 , @craig.topper wrote: > I believe the design here was supposed to be that "generic" would be updated > in X86.td on an ongoing basis to be more modern. So that if users pass > -mtune=generic it would evolve

[PATCH] D118527: [X86] Promote default mtune from generic to sandybridge

2022-01-29 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei abandoned this revision. pengfei added a comment. New approch D118534 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118527/new/ https://reviews.llvm.org/D118527 ___

[PATCH] D120307: [X86] Add helper macros for ternary intrinsics

2022-02-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: RKSimon, craig.topper, LuoYuanke, spatel. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120307 Files: clan

[PATCH] D120307: [X86] Add helper macros for ternary intrinsics

2022-02-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 410520. pengfei marked 2 inline comments as done. pengfei added a comment. In D120307#3337352 , @RKSimon wrote: > Are similar macros used by any other compilers at all? Not so far. GCC folks agreed to add them. I'll

[PATCH] D120307: [X86] Add helper enum for ternary intrinsics

2022-02-22 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512fintrin.h:5944 + (__v16si)(__m512i)(A), (__v16si)(__m512i)(B), (__v16si)(__m512i)(C), \ + (unsigned char)(imm), (__mmask16)-1)) + craig.topper wrote: > Why do we need to change the

[PATCH] D120395: [X86] Prohibit arithmatic operations on type `__bfloat16`

2022-02-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: skan, RKSimon, craig.topper, FreddyYe, LuoYuanke. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `__bfloat16` is defined as X86 specific type that represents the brain floatin

[PATCH] D120395: [X86] Prohibit arithmatic operations on type `__bfloat16`

2022-02-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D120395#3340041 , @RKSimon wrote: > but its still OK to perform arithmetic with __m128bh ? > https://simd.godbolt.org/z/Ef59Ws4M3 Good point! I'd think the define of `__m128bh` is wrong direction. We should use `__m128i` lik

[PATCH] D120395: [X86] Prohibit arithmatic operations on type `__bfloat16`

2022-02-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D120395#3340153 , @pengfei wrote: > In D120395#3340041 , @RKSimon wrote: > >> but its still OK to perform arithmetic with __m128bh ? >> https://simd.godbolt.org/z/Ef59Ws4M3 > > Good po

[PATCH] D120411: [X86] Replace __m[128|256|512]bh with __m[128|256|512]i and mark the former deprecated

2022-02-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: skan, RKSimon, craig.topper, FreddyYe, LuoYuanke. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As discussed on D120395 , we should prohibit

[PATCH] D120395: [X86] Prohibit arithmatic operations on type `__bfloat16`

2022-02-23 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 410827. pengfei added a comment. Herald added subscribers: llvm-commits, jdoerfert. Herald added a project: LLVM. Update LangRef. We use `i16` type to represent bfloat16. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D120395: [X86] Prohibit arithmatic operations on type `__bfloat16`

2022-02-24 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D120395#3343799 , @andrew.w.kaylor wrote: > In D120395#3340953 , @craig.topper > wrote: > >> These intrinsics pre-date the existence of the bfloat type in LLVM. To use >> bfloat we h

[PATCH] D120395: [X86] Prohibit arithmatic operations on type `__bfloat16`

2022-02-25 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 411334. pengfei added a comment. Disscussed with GCC folks. We think it's better to use the same way as D120411 that replacing it with short int. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Sorry, I missed this patch. I think this is a wrong fix. The `buf[9]` doesn't make sense to X86 registers. You can see GCC fails with it too. https://godbolt.org/z/vPcfoG714 I think we just need to do sema check for it to emit error gracefully. BTW, I have a patch D107

[PATCH] D120395: [X86] Prohibit arithmetic operations on type `__bfloat16`

2022-03-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @andrew.w.kaylor ! You are totally correct about the intention and current implementations. > Concretely, what are the semantics that we want for the BF16 types and > intrinsics? Unlike the other floating-point types, there's no standard to > guide this, so it's

[PATCH] D120395: [X86] Prohibit arithmetic operations on type `__bfloat16`

2022-03-03 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > if we define the `__bfloat16` type as the built-in `__bf16` type, then the > front end can apply whatever rules it has for that type, including adding > whatever ABI handling is needed for BF16 values. I don't agree. Unlike `__fp16`, `__bf16` is simple an ARM specific

[PATCH] D117836: Fix obvious typo

2022-03-06 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. Herald added a project: All. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117836/new/ https://reviews.llvm.org/D117836 ___

[PATCH] D121072: [X86][Experiment] Mangle global variable for inline assembly

2022-03-06 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is an experiment inspired by @efriedma 's suggestion on D120887 . It seems a more co

[PATCH] D121072: [X86][Experiment] Mangle global variable for inline assembly

2022-03-06 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2555-2556 +M.getNameWithPrefix(MangleName, GV, /*CannotUsePrivateLabel=*/true); +AsmString.replace(AsmString.find("$" + std::to_string(I)), 2, + MangleName.c_str()); +

[PATCH] D120307: [X86] Add helper enum for ternary intrinsics

2022-03-06 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Herald added a project: All. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120307/new/ https://reviews.llvm.org/D120307 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D107141: [Inline-asm] Add structure type handling when they are tied in input and output constraints

2022-03-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 413453. pengfei added a comment. Herald added a project: All. Refactor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/include/clang/Basic/DiagnosticS

[PATCH] D107141: [Inline-asm] Add diagnosts for unsupported inline assembly arguments

2022-03-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 413676. pengfei marked 2 inline comments as done. pengfei added a comment. Thanks @skan ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/include/clang

[PATCH] D120307: [X86] Add helper enum for ternary intrinsics

2022-03-07 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 rG4de9a752d6af: [X86] Add helper enum for ternary intrinsics (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D115942#3226101 , @craig.topper wrote: > Does this have the same autoupgrade issues as @efriedma raised in > https://reviews.llvm.org/D86310 No. The differences are that i128 can be generated by front end while f80 cannot w

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D115942#3226146 , @rnk wrote: > Yeah, let's try to reach some resolution on that. The things are different. We don't support f80 type on Windows 32 bits previously. It means we don't have the burden to upgrade, since there's

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 398123. pengfei added a comment. Structure the layout spelling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942 Files: clang/lib/Basic/Targets/X86.h clang/test/Co

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 398334. pengfei added a comment. Herald added a subscriber: dexonsmith. > However, do we need to make changes to `llvm::UpgradeDataLayoutString`? > Otherwise, I believe old bitcode for MSVC targets will no longer be able to > be loaded for LTO. Makes sense.

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 398335. pengfei added a comment. Missed one unittest. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942 Files: clang/lib/Basic/Targets/X86.h clang/test/CodeGen/targ

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 399235. pengfei marked an inline comment as done. pengfei added a comment. Add comments in code. @rnk, thanks for your patient review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.l

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4583-4589 + if (T.isArch64Bit() || !T.isWindowsMSVCEnvironment()) +return Res; - return (Groups[1] + AddrSpaces + Groups[3]).str(); + StringRef Ref = Res; + auto I = Ref.find("-f80:32-"); + if (I !=

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks Craig! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-12 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 rG1bb0caf56168: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match… (authored by pengfei). Repository: rG LLVM Github Mono

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @fhahn ! I saw the failure. I think it just needs to update the datalayout in the lit tests. I am checking on this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942 ___

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Should be fixed by rG9b43237128da . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942 _

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. I see, I will investigate the reason and do a follow up. Thanks @efriedma and @rnk ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942 _

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. It caused by bug in AutoUpgrade.cpp, fixed on D117270 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942

[PATCH] D115942: [X86][MS] Change the alignment of f80 to 16 bytes on Windows 32bits to match with ICC

2022-01-14 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 400231. pengfei added a comment. Fix AutoUpgrade bug catched by buildbot. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115942/new/ https://reviews.llvm.org/D115942 Files: clang/lib/Basic/Targets/X86.h cla

[PATCH] D115225: [X86][MS-InlineAsm] Make the constraint *m to be simple place holder

2021-12-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: skan, xiangzhangllvm, craig.topper, coby. Herald added a subscriber: hiraditya. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. D113096

[PATCH] D114782: [X86][clang] Emit diagnostic for float and double when we have features -x87 and -sse on 64-bits

2021-12-07 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4a2c827b178f: [X86][clang] Emit diagnostic for float and double when we have features -x87… (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D114782: [X86][clang] Emit diagnostic for float and double when we have features -x87 and -sse on 64-bits

2021-12-07 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @asavonic for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114782/new/ https://reviews.llvm.org/D114782 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D115337: [X86][clang] Put the update of HasLongDouble into TargetInfo::adjust

2021-12-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: asavonic, erichkeane, nickdesaulniers, andrew.w.kaylor. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We found a problem that `-mlong-double-64` doesn't work with `-mno-x87`

[PATCH] D115410: [llvm][test] rewrite callbr to use i rather than X constraint NFC

2021-12-08 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/test/Verifier/callbr.ll:42 + callbr void asm sideeffect "${0:l} ${1:l} ${2:l}", "i,X,i"(i8* blockaddress(@test3, %4), i8* blockaddress(@test3, %2), i8* blockaddress(@test3, %3)) to label %1 [label %3, label %4] 1: ---

[PATCH] D115225: [X86][MS-InlineAsm] Make the constraint *m to be simple place holder

2021-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/ms-inline-asm-functions.c:42 __asm mov eax, k; - // CHECK: movl_k, %eax + // CHECK: movlk, %eax __asm mov eax, kptr; skan wrote: > This change is strange here. Others looks good to me.

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2021-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: rnk, andrew.w.kaylor, erichkeane, craig.topper. Herald added a subscriber: hiraditya. pengfei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. MSVC currently doesn't s

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2021-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D115441#3182938 , @craig.topper wrote: > Doesn’t icc also emit code into main to change the FPCW precision control > field? Is making long double 80 bits useful if you don’t increase the > precision in hardware? Yes, but it

[PATCH] D114782: [X86][clang] Emit diagnostic for float and double when we have features -x87 and -sse on 64-bits

2021-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Hi @phosek , thanks for reporting it. I would consider it as a misuse of the header file when SSE is not usable, especially we now have the specific header "x86gprintrin.h" for such scenarios. Can you help to try if changing to "x86gprintrin.h" works? Repository: rG

[PATCH] D115225: [X86][MS-InlineAsm] Make the constraint *m to be simple place holder

2021-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd7c07f60b35f: [X86][MS-InlineAsm] Make the constraint *m to be simple place holder (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11522

[PATCH] D115225: [X86][MS-InlineAsm] Make the constraint *m to be simple place holder

2021-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115225/new/ https://reviews.llvm.org/D115225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D114782: [X86][clang] Emit diagnostic for float and double when we have features -x87 and -sse on 64-bits

2021-12-09 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Oh, that makes sense to me. Reverted and I will investigate it. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114782/new/ https://reviews.llvm.org/D114782 ___ cfe-commits

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2021-12-11 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > I seem to recall assuming that Windows long double was 64-bits in many, many > places. Unfortunately, I have no idea where that could've happened. Is it because MSDN explicitly declares it? https://docs.microsoft.com/en-us/previous-versions/9cx8xs15(v=vs.140)?redirect

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2021-12-12 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Thanks @mstorsjo for the inputs. > However outside of the core OS, any function in the CRT, that uses long > doubles, is going to be wrong Good point! I didn't think much on the CRT library. But I think this is not a blocking issue, given 1. The option is off by defau

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512vlbf16intrin.h:416 ///and fraction field is truncated to 7 bits. -static __inline__ __bfloat16 __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh(float __A) { +static __inline__ short __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/lib/Headers/avx512vlbf16intrin.h:416 ///and fraction field is truncated to 7 bits. -static __inline__ __bfloat16 __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh(float __A) { +static __inline__ short __DEFAULT_FN_ATTRS128 _mm_cvtness_sbh

[PATCH] D115410: [llvm][test] rewrite callbr to use i rather than X constraint NFC

2021-12-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: llvm/test/tools/llvm-diff/callbr.ll:28-29 entry: - callbr void asm sideeffect "", "X,X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@foo, %t_no), i8* blockaddress(@foo, %return)) + callbr void asm sideeffect "", "i,i,~{dirflag},~{fp

[PATCH] D115611: [X86][BF16] delete `typedef unsigned short __bfloat16`

2021-12-13 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei requested changes to this revision. pengfei added a comment. This revision now requires changes to proceed. I would suggest we drop the change. Sorry for my fickleness :( Comment at: clang/lib/Headers/avx512bf16intrin.h:32 /// \param __A ///A bfloat data. /// \re

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2021-12-14 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > I have a thought. Why do you need to change the LLVM data layout at all? > Clang's record layout is distinct from LLVM's data layout. This is similar to > how -malign-double works, which does not affect LLVM's data layout, it is > entirely a frontend change. We have

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2021-12-14 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D115441#3189551 , @JohnReagan wrote: > Does any of this impact the -f128 support? We use f128 x-float on OpenVMS. > We've historically only aligned on 8-byte boundaries for legacy reasons (I'm > not opposed to having my ow

[PATCH] D115441: [X86][MS] Add 80bit long double support for Windows

2021-12-14 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. > GCC doesn't align fp80 long double to 16 bytes on i686, so I see no reason > for LLVM to do it. Is there some other compiler that you need ABI > compatibility with? Yes. ICC aligns long double to 16 bytes on 32bit Windows. (I mentioned it in the summary :). In contra

<    1   2   3   4   5   6   >