[PATCH] D138249: [WebAssembly] Update relaxed-simd instruction names

2022-11-18 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/include/clang/Basic/BuiltinsWebAssembly.def:180 TARGET_BUILTIN(__builtin_wasm_relaxed_min_f64x2, "V2dV2dV2d", "nc", "relaxed-simd") -TARGET_BUILTIN(__builtin_wasm_relaxed_max_f64x2, "V2dV2dV2d", "nc", "relaxed-simd") +TARGET_BUI

[PATCH] D138249: [WebAssembly] Update relaxed-simd instruction names

2022-11-18 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 476490. tlively added a comment. - Fix type Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138249/new/ https://reviews.llvm.org/D138249 Files: clang/include/clang/Basic/BuiltinsWebAssembly.def clang/lib/Cod

[PATCH] D138249: [WebAssembly] Update relaxed-simd instruction names

2022-11-21 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGae96b5bd2dd0: [WebAssembly] Update relaxed-simd instruction names (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138249/new/ https://r

[PATCH] D76538: [WebAssembly] Add SIMD integer abs builtins

2020-03-20 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100, dschuff. Herald added a project: clang. Since the conditional operator cannot be used with vector conditions in C, we need a builtin to be able to express th

[PATCH] D76538: [WebAssembly] Add SIMD integer abs builtins

2020-03-21 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGde6cd3e836e1: [WebAssembly] Add SIMD integer abs builtins (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76538/new/ https://reviews.ll

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-27 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 253249. tlively added a comment. - Update license to match xmmintrin.h format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76959/new/ https://reviews.llvm.org/D76959 Files: clang/lib/Headers/CMakeLists.txt

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-27 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, sunfish. Herald added subscribers: cfe-commits, jgravelle-google, sbc100, mgorny, dschuff. Herald added a project: clang. tlively updated this revision to Diff 253249. tlively added a comment. - Update license to match xmmintrin.h f

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-27 Thread Thomas Lively via Phabricator via cfe-commits
tlively marked 2 inline comments as done. tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:10 + +#pragma once + sunfish wrote: > Do you know why other clang headers, such as `lib/Headers/xmmintrin.h`, don't > use `#pragma once`? No, I

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-30 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 253703. tlively marked 3 inline comments as done. tlively added a comment. - Prefix identifiers with `__` - Use specific bit-widths where possible - Do not change semantics under -funsigned-char Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-30 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 253713. tlively added a comment. - Use header guard macro instead of pragma Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76959/new/ https://reviews.llvm.org/D76959 Files: clang/lib/Headers/CMakeLists.txt

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-30 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. I believe all the feedback has now been addressed. Comment at: clang/lib/Headers/wasm_simd128.h:30 +typedef long long __i64x2 __attribute__((__vector_size__(16), __aligned__(16))); +typedef unsigned long long __u64x2 +__attribute__((__vector_size__

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-30 Thread Thomas Lively via Phabricator via cfe-commits
tlively marked an inline comment as done. tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:30 +typedef long long __i64x2 __attribute__((__vector_size__(16), __aligned__(16))); +typedef unsigned long long __u64x2 +__attribute__((__vector_size__(16),

[PATCH] D76959: [WebAssembly] Import wasm_simd128.h from Emscripten

2020-03-30 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5074776de478: [WebAssembly] Import wasm_simd128.h from Emscripten (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76959/new/ https://re

[PATCH] D77185: [WebAssembly] Rename SIMD min/max/avgr intrinsics for consistency

2020-03-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100, dschuff. Herald added a project: clang. The convention for the wasm_simd128.h intrinsics is to have the integer sign in the lane interpretation rather than a

[PATCH] D77185: [WebAssembly] Rename SIMD min/max/avgr intrinsics for consistency

2020-04-01 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG95fac2e46b73: [WebAssembly] Rename SIMD min/max/avgr intrinsics for consistency (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77185/ne

[PATCH] D69696: [WebAssembly] SIMD integer min and max instructions

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: llvm-commits, cfe-commits, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added projects: clang, LLVM. Introduces a clang builtins and LLVM intrinsics representing integer min/max instructio

[PATCH] D69697: [WebAssembly] Add experimental SIMD dot product instruction

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: llvm-commits, cfe-commits, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added projects: clang, LLVM. This instruction is not merged to the spec proposal, but we need it to be implemented i

[PATCH] D69696: [WebAssembly] SIMD integer min and max instructions

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D69696#1729676 , @aheejin wrote: > Is this https://github.com/WebAssembly/simd/pull/27 ? Can you please include > the spec (even if it's still an unmerged PR) in the CL description next time? > LGTM. Yes, that's right. Will

[PATCH] D69697: [WebAssembly] Add experimental SIMD dot product instruction

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. This is https://github.com/WebAssembly/simd/pull/127 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69697/new/ https://reviews.llvm.org/D69697 ___ cfe-commits mailing list cfe-c

[PATCH] D69699: [clang][driver] Add ProfileData to LLVM_LINK_COMPONENTS

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively 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/D69699/new/ https://reviews.llvm.org/D69699

[PATCH] D69697: [WebAssembly] Add experimental SIMD dot product instruction

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. https://github.com/WebAssembly/simd/pull/127 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69697/new/ https://reviews.llvm.org/D69697 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D69696: [WebAssembly] SIMD integer min and max instructions

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa07019a275cd: [WebAssembly] SIMD integer min and max instructions (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69696/new/ https://re

[PATCH] D69697: [WebAssembly] Add experimental SIMD dot product instruction

2019-10-31 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 227393. tlively added a comment. - Add second argument Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69697/new/ https://reviews.llvm.org/D69697 Files: clang/include/clang/Basic/BuiltinsWebAssembly.def clan

[PATCH] D69697: [WebAssembly] Add experimental SIMD dot product instruction

2019-11-01 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG935c84c3c27d: [WebAssembly] Add experimental SIMD dot product instruction (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69697/new/ ht

[PATCH] D69832: [WebAssembly] -fwasm-exceptions enables reference-types

2019-11-13 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively added a comment. This revision is now accepted and ready to land. LGTM, sorry for the delay! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69832/new/ https://reviews.llvm.org/D69832 ___

[PATCH] D66983: [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic

2019-12-13 Thread Thomas Lively via Phabricator via cfe-commits
tlively planned changes to this revision. tlively added a comment. This issue is still not resolved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66983/new/ https://reviews.llvm.org/D66983 ___ cfe-com

[PATCH] D71500: [WebAssembly] Replace SIMD int min/max builtins with patterns

2019-12-13 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: llvm-commits, cfe-commits, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added projects: clang, LLVM. The instructions were originally implemented via builtins and intrinsics so users would

[PATCH] D71500: [WebAssembly] Replace SIMD int min/max builtins with patterns

2019-12-16 Thread Thomas Lively via Phabricator via cfe-commits
tlively marked an inline comment as done. tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:189 + setOperationAction(Op, T, Legal); +} + aheejin wrote: > Just curious, what gets assigned we don't do th

[PATCH] D71500: [WebAssembly] Replace SIMD int min/max builtins with patterns

2019-12-16 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3a93756dfbb0: [WebAssembly] Replace SIMD int min/max builtins with patterns (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71500/new/

[PATCH] D71648: [WebAssembly] Add avgr_u intrinsics and require nuw in patterns

2019-12-17 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: llvm-commits, cfe-commits, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added projects: clang, LLVM. The vector pattern `(a + b + 1) / 2` was previously selected to an avgr_u instruction r

[PATCH] D71648: [WebAssembly] Add avgr_u intrinsics and require nuw in patterns

2019-12-18 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG71eb8023d85e: [WebAssembly] Add avgr_u intrinsics and require nuw in patterns (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71648/new/

[PATCH] D75770: [WebAssembly] Add SIMD integer min/max builtins

2020-03-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, dschuff, kripken. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100. Herald added a project: clang. Although SIMD integer min/max operations can be expressed using the ?: operator in C++, that operator is disal

[PATCH] D75770: [WebAssembly] Add SIMD integer min/max builtins

2020-03-06 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd43fcd0c0410: [WebAssembly] Add SIMD integer min/max builtins (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75770/new/ https://review

[PATCH] D76397: [WebAssembly] SIMD bitmask intrinsics and builtin functions

2020-03-18 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: cfe-commits, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added a project: clang. These experimental new instructions are proposed in https://github.com/WebAssembly/simd/pull/201. Reposi

[PATCH] D76397: [WebAssembly] SIMD bitmask intrinsics and builtin functions

2020-03-19 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa3f974f3c332: [WebAssembly] SIMD bitmask intrinsics and builtin functions (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76397/new/ ht

[PATCH] D73926: [WebAssembly] Enable recently implemented SIMD operations

2020-02-03 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: llvm-commits, cfe-commits, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added projects: clang, LLVM. Moves a batch of instructions from unimplemented-simd128 to simd128 because they have r

[PATCH] D72972: [WebAssembly] Add experimental multivalue calling ABI

2020-02-03 Thread Thomas Lively via Phabricator via cfe-commits
tlively marked 3 inline comments as done. tlively added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:741 + explicit WebAssemblyABIInfo(CodeGen::CodeGenTypes &CGT, ABIKind _Kind) + : SwiftABIInfo(CGT), defaultInfo(CGT), Kind(_Kind) {} ahee

[PATCH] D73926: [WebAssembly] Enable recently implemented SIMD operations

2020-02-04 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG27748363da8d: [WebAssembly] Enable recently implemented SIMD operations (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73926/new/ http

[PATCH] D72972: [WebAssembly] Add experimental multivalue calling ABI

2020-02-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively marked 2 inline comments as done. tlively added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:741 + explicit WebAssemblyABIInfo(CodeGen::CodeGenTypes &CGT, ABIKind _Kind) + : SwiftABIInfo(CGT), defaultInfo(CGT), Kind(_Kind) {} ahee

[PATCH] D72972: [WebAssembly] Add experimental multivalue calling ABI

2020-02-04 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c3e6af71b8e: [WebAssembly] Add experimental multivalue calling ABI (authored by tlively). Changed prior to commit: https://reviews.llvm.org/D72972?vs=238937&id=242511#toc Repository: rG LLVM Github

[PATCH] D72972: [WebAssembly] Add experimental multivalue calling ABI

2020-01-17 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, dschuff. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100. Herald added a project: clang. For now, this ABI simply expands all possible aggregate arguments and returns all possible aggregates directly. This AB

[PATCH] D73322: [WebAssembly] Update bleeding-edge CPU features

2020-01-24 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively added a comment. This revision is now accepted and ready to land. Sounds good to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73322/new/ https://reviews.llvm.org/D73322 ___

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-02-28 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D139010#4158540 , @aaron.ballman wrote: > Roping in @jfb because I know he's been heavily involve in WebAssembly in the > past and he may have ideas/opinions. > > High-level question: are externref, funcref, and table types a

[PATCH] D144169: [WebAssembly] Fix simd bit shift intrinsics codegen

2023-02-16 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144169/new/ https://reviews.llvm.org/D144169

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-15 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Thanks for the ping, will take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-17 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. It looks like the LLVM-side changes are generally moving Wasm type classification functions to a more global location. Since no other backend should care about these things, it would be better if we could get away without these changes. Comment at: l

[PATCH] D150833: [WebAssembly] Add wasm_simd128.h intrinsics for relaxed SIMD

2023-05-17 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, dschuff. Herald added subscribers: pmatos, asb, wingo, ecnelises, sunfish, jgravelle-google, sbc100. Herald added a project: All. tlively requested review of this revision. Herald added a project: clang. Herald added a subscriber: cf

[PATCH] D150833: [WebAssembly] Add wasm_simd128.h intrinsics for relaxed SIMD

2023-05-18 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc672c3fe05ad: [WebAssembly] Add wasm_simd128.h intrinsics for relaxed SIMD (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150833/new/

[PATCH] D151820: [clang][WebAssembly] Fix __BIGGEST_ALIGNMENT__ under emscripten

2023-06-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D151820#4385512 , @dschuff wrote: > I seem to recall that @tlively and I spent a bunch of time with XNNpack > chasing down some kind of subtle error that I suspect had to do with > alignment, but maybe he remembers that bette

[PATCH] D121014: [WebAssembly] Check bulk-memory when adjusting lang opts

2022-03-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: sbc100. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, dschuff. Herald added a project: All. tlively requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. We

[PATCH] D121014: [WebAssembly] Check bulk-memory when adjusting lang opts

2022-03-04 Thread Thomas Lively 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 rG3be9e0ba972c: [WebAssembly] Check bulk-memory when adjusting lang opts (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D121014: [WebAssembly] Check bulk-memory when adjusting lang opts

2022-03-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. @dyung, this should be fixed by https://reviews.llvm.org/rGc01ec3083026f7e24e6c06f48a05d413e2c697d4 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121014/new/ https://reviews.llvm.org/D121014 __

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-22 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, dschuff. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, sbc100. tlively requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Adds new intrinsics for instruc

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ aheejin wrote:

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 340109. tlively added a comment. - "stand" => "standard" - Update builtins for v128.any_true Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101112/new/ https://reviews.llvm.org/D101112 Files: clang/include/cl

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D101112#2710521 , @aheejin wrote: > General question about SIMD intrinsics: So we make dedicated wasm intrinsics > only for the cases there are not general intrinsics people can use instead? No, every instruction in the propo

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ dschuff wrote:

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:969 +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_ceil(v128_t __a) { + return (v128_t)__builtin_wasm_ceil_f32x4((__f32x4)__a); +} aheejin wrote: > Sometimes builtin names seem

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively 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 rG502f54049d17: [WebAssembly] Finalize wasm_simd128.h intrinsics (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D101112: [WebAssembly] Finalize wasm_simd128.h intrinsics

2021-04-23 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: clang/lib/Headers/wasm_simd128.h:171 + +#define wasm_v128_load8_lane(__ptr, __vec, __i) \ + ((v128_t)__builtin_wasm_load8_lane((signed char *)(__ptr), (__i8x16)(__vec), \ aheejin wrote:

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-04-30 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Nice! I think that splitting this out of the change that adds reference types is a good idea. Regarding the FIXME in the test, is it the case that the globals are also not emitted in the binary format, or is it just the assembly output that is broken? ===

[PATCH] D101684: [WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

2021-04-30 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, dschuff. Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100. tlively requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. A

[PATCH] D101684: [WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

2021-04-30 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 342121. tlively added a comment. - squash to include all changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101684/new/ https://reviews.llvm.org/D101684 Files: clang/lib/Headers/wasm_simd128.h clang/tes

[PATCH] D101684: [WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

2021-05-02 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D101684#2732310 , @dblaikie wrote: >> Assembly tests are generally discouraged in clang, but in this case we >> actually care about the specific instruction being generated from the >> intrinsics. > > I don't think this is a

[PATCH] D101684: [WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

2021-05-02 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D101684#2732395 , @dblaikie wrote: > In D101684#2732366 , @tlively wrote: > >> In order to get the benefit of this end-to-end test from split tests like >> that, the LLVM test would ha

[PATCH] D101735: [WebAssembly] Reenable end-to-end test in wasm-eh.cpp

2021-05-03 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively added a comment. This revision is now accepted and ready to land. This is hopefully less controversial because the test already exists and this is just re-enabling it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D101684: [WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

2021-05-03 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. I chatted with @dblaikie offline about this just now, and we both think it makes sense to turn this particular test into a C->IR test, then later potentially add a C->Wasm end-to-end test to the cross-project-tests directory created in this WIP stack of diffs: https://r

[PATCH] D101805: [WebAssembly] Add codegen test for wasm_simd128.h

2021-05-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. At just under 4 seconds on my machine, it's certainly not one of the quickest clang lit tests, but neither is it one of the slowest. It looks like there are many that take tens of seconds. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D101140: [WebAssembly][CodeGen] IR support for WebAssembly local variables

2021-05-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/include/llvm/CodeGen/MIRYamlMapping.h:351 IO.enumCase(ID, "scalable-vector", TargetStackID::ScalableVector); +IO.enumCase(ID, "object", TargetStackID::Object); IO.enumCase(ID, "noalloc", TargetStackID::NoAlloc); --

[PATCH] D101684: [WebAssembly] Add end-to-end codegen tests for wasm_simd128.h

2021-05-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D101684#2737842 , @penzn wrote: > I think there is another dimension to this aside from project composition - > intrinsics have a tendency to "interact" with their surroundings, and it > better to capture the IR rather than t

[PATCH] D101883: [WebAssembly] Update SIMD builtin function operand types

2021-05-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, sbc100, dschuff. tlively requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add `const` to the pointer

[PATCH] D101883: [WebAssembly] Update SIMD builtin function operand types

2021-05-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively updated this revision to Diff 342946. tlively added a comment. - Remove (incorrect) const pointer changes. Will fix them and put them in a separate revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101883/new/ https://reviews.llvm.or

[PATCH] D101884: [WebAssembly] Fix constness of pointer params to load intrinsics

2021-05-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, sbc100, dschuff. tlively requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update the SIMD builtin load

[PATCH] D101885: [WebAssembly] Add SIMD const_splat intrinsics

2021-05-04 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, sbc100, dschuff. tlively requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. These intrinsics do not corre

[PATCH] D101805: [WebAssembly] Add codegen test for wasm_simd128.h

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. Thanks, @hans! That's very surprising; I'll take a deeper look at what was going wrong. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101805/new/ https://reviews.llvm.org/D101805 __

[PATCH] D101884: [WebAssembly] Fix constness of pointer params to load intrinsics

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. It only matters for pointer parameters. For example, `const int *` is meaningfully different from `int *`, but `const int` is not usefully different from `int`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101884/new/ ht

[PATCH] D101883: [WebAssembly] Update narrowing builtin function operand types

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG627a52695537: [WebAssembly] Update narrowing builtin function operand types (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101883/new/

[PATCH] D101884: [WebAssembly] Fix constness of pointer params to load intrinsics

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D101884#2739898 , @aheejin wrote: > I see, thanks. Then other load instructions are OK not to be fixed? > > - `v128.load` > - `v128.loadN_splat` > - `v128.loadNxM_s/u` Yep, the intrinsics for those instructions were already us

[PATCH] D101884: [WebAssembly] Fix constness of pointer params to load intrinsics

2021-05-05 Thread Thomas Lively 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 rG602f318cfdac: [WebAssembly] Fix constness of pointer params to load intrinsics (authored by tlively). Changed prior to commit: https://reviews.llv

[PATCH] D101885: [WebAssembly] Add SIMD const_splat intrinsics

2021-05-05 Thread Thomas Lively 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 rG81fce29d6e1f: [WebAssembly] Add SIMD const_splat intrinsics (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D101805: [WebAssembly] Add codegen test for wasm_simd128.h

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. @dblaikie, what's the best practice for making tests robust to this difference? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101805/new/ https://reviews.llvm.org/D101805 ___ cfe

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. LGTM with Sam's comments resolved! Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:40 + // appropriate. + WASM_ADDRESS_SPACE_OBJECT = 1 +}; sbc100 wrote: > What does "object" mean here? Are we just talking about

[PATCH] D95425: Implementation of global.get/set for reftypes in LLVM IR

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrTable.td:15 multiclass TABLE { + let mayLoad = 1 in defm TABLE_GET_#rt : I<(outs rt:$res), (ins table32_op:$table), wingo wrote: > I think you may need `hasSideEffects = 0

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:40 + // appropriate. + WASM_ADDRESS_SPACE_OBJECT = 1 +}; sbc100 wrote: > tlively wrote: > > sbc100 wrote: > > > What does "object" mean here? Are we just talki

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:40 + // appropriate. + WASM_ADDRESS_SPACE_OBJECT = 1 +}; sbc100 wrote: > tlively wrote: > > sbc100 wrote: > > > tlively wrote: > > > > sbc100 wrote: > > > > > Wh

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-05 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:40 + // appropriate. + WASM_ADDRESS_SPACE_OBJECT = 1 +}; sbc100 wrote: > tlively wrote: > > sbc100 wrote: > > > tlively wrote: > > > > sbc100 wrote: > > > > > tl

[PATCH] D101979: [WebAssembly] Fix argument types in SIMD narrowing intrinsics

2021-05-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, sbc100, dschuff. tlively requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The builtins were updated to

[PATCH] D101979: [WebAssembly] Fix argument types in SIMD narrowing intrinsics

2021-05-06 Thread Thomas Lively 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 rGb198b9b8974b: [WebAssembly] Fix argument types in SIMD narrowing intrinsics (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively added a comment. This revision is now accepted and ready to land. This LGTM! `MANAGED` sounds like a good address space name to me. @sbc100, do you have any final comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1279 + if (const GlobalAddressSDNode *GA = dyn_cast(Op)) +return WebAssembly::isManagedAddressSpace(GA->getAddressSpace()); + Actually, should we enforce that

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:1279 + if (const GlobalAddressSDNode *GA = dyn_cast(Op)) +return WebAssembly::isManagedAddressSpace(GA->getAddressSpace()); + tlively wrote: > Actually, should

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:39 + // pointers are lowered to global.get / global.set or local.get / local.set, + // as appropriate. + WASM_ADDRESS_SPACE_MANAGED = 1 sunfish wrote: > Sorry t

[PATCH] D102018: [WebAssembly] Use functions instead of macros for const SIMD intrinsics

2021-05-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added a reviewer: aheejin. Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, sbc100, dschuff. tlively requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. To improve hygiene, consisten

[PATCH] D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR

2021-05-06 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h:39 + // pointers are lowered to global.get / global.set or local.get / local.set, + // as appropriate. + WASM_ADDRESS_SPACE_MANAGED = 1 sunfish wrote: > tlively

[PATCH] D102018: [WebAssembly] Use functions instead of macros for const SIMD intrinsics

2021-05-07 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. In D102018#2743818 , @aheejin wrote: > So what prevented us from using functions when we were using `_Static_assert` > and why is it now possible to use functions? From inside a function, the parameter never looks like a constan

[PATCH] D102018: [WebAssembly] Use functions instead of macros for const SIMD intrinsics

2021-05-07 Thread Thomas Lively 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 rG1e9c39a3f982: [WebAssembly] Use functions instead of macros for const SIMD intrinsics (authored by tlively). Repository: rG LLVM Github Monorepo

[PATCH] D98676: [WebAssembly] Finalize SIMD names and opcodes

2021-03-15 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, dschuff. Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100. tlively requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. U

[PATCH] D98676: [WebAssembly] Finalize SIMD names and opcodes

2021-03-16 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td:1243 // Prototype f64x2 conversions defm "" : SIMDConvert If they are finalized, can we delete these "prototype" comments here and > elsewhere? (not necessarily in this CL) Yes, th

[PATCH] D98466: [WebAssembly] Remove experimental SIMD instructions

2021-03-18 Thread Thomas Lively 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 rG2f2ae08da91d: [WebAssembly] Remove experimental SIMD instructions (authored by tlively). Changed prior to commit: https://reviews.llvm.org/D98466?

[PATCH] D98676: [WebAssembly] Finalize SIMD names and opcodes

2021-03-18 Thread Thomas Lively 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 rGf5764a8654e3: [WebAssembly] Finalize SIMD names and opcodes (authored by tlively). Changed prior to commit: https://reviews.llvm.org/D98676?vs=330

<    1   2   3   4   5   >