Max Graey

Results 346 comments of Max Graey

It seems this handling by Interprocedural Sparse Conditional Constant Propagation (`-ipsccp` pass): https://godbolt.org/z/z6nev7Pdd The main problem is SSA form requirement. See original paper: https://www.cs.utexas.edu/users/lin/cs380c/wegman.pdf But I admit that it is...

@kripken As I understand with new GUFA pass can potentially handle this? Just need to teach this pass visit switches (bt_table) and if / br_if ?

Well, I guess constant propagation for `==` will be enough for most of the cases for (if, br_if, select and br_table)

Here wasm dumps for v8 (turbofun) for `copysign(x, -C)` and `neg(abs(x))`: ```asm index: 0 kind: wasm function compiler: TurboFan Body (size = 128 = 80 + 48 padding) Instructions (size...

@kripken Apparently, it doesn't matter if engines can optimize nabs to a single instruction, it's still faster as we can see here: https://github.com/WebAssembly/binaryen/pull/5032#issuecomment-1244069071

It makes sense due to `neg(abs(x))` could be optimized to single instruction on most architectures. See this: https://github.com/bytecodealliance/wasmtime/issues/4803 Also on x64 and AVX-512 `copysign` could be lowered to single inst...

@kripken Since we found out that even in the current situation with wasm engines we get a more optimal codogen in any way, can we merge that?

> low hamming weight rather than a max value? Yeah, perhaps this will be better

It will be great if someone from Google who very good familiar help improve this. Closure Compiler also have a lot of special annotations which may improve glue quality I...

@akirilov-arm Thanks for the clarification. I removed the mention of `armv7`