[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

[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

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

2022-02-24 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In D120395#3340953 , @craig.topper wrote: > These intrinsics pre-date the existence of the bfloat type in LLVM. To use > bfloat we have to make __bf16 a legal type in C. This means we need to > support loads, stores,

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

2022-02-23 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D120395#3340891 , @andrew.w.kaylor wrote: > In D120395#3340496 , @pengfei wrote: > >> Update LangRef. We use `i16` type to represent bfloat16. > > Why are we using i16 to

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

2022-02-23 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In D120395#3340496 , @pengfei wrote: > Update LangRef. We use `i16` type to represent bfloat16. Why are we using i16 to represent bfloat16? The bfloat type is better. Repository: rG LLVM Github Monorepo CHANGES

[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

[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

[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`

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

2022-02-23 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. but its still OK to perform arithmetic with __m128bh ? https://simd.godbolt.org/z/Ef59Ws4M3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120395/new/ https://reviews.llvm.org/D120395

[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