<andrewrk>
mikdusan, your help has been really valuable in the llvm12 branch. really appreciate it. if you're looking for another one, we're seeing some trouble executing the wasm32-wasi behavior tests with wasmtime
<andrewrk>
aaaand damn, just hit a mips regression
<mikdusan>
I'll take a peek. first I have a reduction I'll add for #8130
<mikdusan>
oh interesting. I created the reduction on master as baseline for no error. llc reduction.ll yields no error, then,
<mikdusan>
same thing on llvm12 and we get error, but in an interesting twist,
<mikdusan>
llvm12's llc against master's reduction.ll (the one that doesn't error)... and it still errors.
<mikdusan>
so look very much like upstream right now
<v0idifyy>
wouldn't it be good to have extensions for zig for some very specific features that should be avoided in the main spec?
<mikdusan>
not cool: rustup and the 2nd warning it gives me: "Warning: Detected OS X platform older than 10.13"
<mikdusan>
lies
<andrewrk>
v0idifyy, that's the plan for the C integration features
decentpenguin has quit [Ping timeout: 264 seconds]
decentpenguin has joined #zig
<mikdusan>
andrewrk: re: wasm32-wasi is there an issue open? and did we have success on master with wasmtime and behavior tests
<mikdusan>
ie: assuming this is an llvm12 thing
<andrewrk>
I didn't open an issue yet. the repro is `./zig test ../test/stage1/behavior.zig -target wasm32-wasi --test-cmd wasmtime --test-cmd-bin -I ../test`
<andrewrk>
yes it's an llvm12 thing. the above command passes all tests on master, and on llvm12 branch `Error: failed to run main module...` followed by some more stderr
<mikdusan>
--test-cmd run
<andrewrk>
hm?
<mikdusan>
wasmtime has a sub-command. don't you need `--test-cmd wasmtime --test-cmd run --test-cmd-bin`
<mikdusan>
anyways I'll look into it. just adding a worktree :)
<andrewrk>
can you paste the full alternate command you are suggesting?
<mikdusan>
just getting into it; this is what I have:
<mikdusan>
`zig test test/stage1/behavior.zig -target wasm32-wasi --test-cmd wasmtime --test-cmd run --test-cmd-bin`
<mikdusan>
help Prints this message or the help of the given subcommand(s)
<mikdusan>
run Runs a WebAssembly module
<mikdusan>
wasm2obj Translates a WebAssembly module to native object file
<mikdusan>
wast Runs a WebAssembly test script file
<mikdusan>
wasmtime
<andrewrk>
it also says > If a subcommand is not provided, the `run` subcommand will be used
<mikdusan>
slap.
<mikdusan>
ok I have enough to go on. thx
<andrewrk>
thank you!
leah2 has quit [Ping timeout: 260 seconds]
leah2 has joined #zig
filpAM has quit [Ping timeout: 245 seconds]
brzg has joined #zig
tjammer[m] has quit [*.net *.split]
vazub[m] has quit [*.net *.split]
Biolunar has quit [*.net *.split]
kushalp has quit [*.net *.split]
r0bby has quit [*.net *.split]
larme has quit [*.net *.split]
vazub[m] has joined #zig
kushalp has joined #zig
tjammer[m] has joined #zig
Biolunar has joined #zig
r0bby has joined #zig
larme has joined #zig
r0bby has quit [Ping timeout: 258 seconds]
<mikdusan>
heh #8131 is somehow related to @reduce too
<andrewrk>
huh. I did not expect that
r0bby has joined #zig
<mikdusan>
just a guess, but llvm12 is having difficulty deciding how to gen machine code for @llvm reduce builtins
<andrewrk>
we could try commenting out the behavior test cases that have @reduce in it
<mikdusan>
for us seemingly manifesting only with floats. (reduction uses f16 but f32 yields same result)
<mikdusan>
and @llvm reduce dropped the "experimental" and was mentioned "ready" in their 12.0 release notes
<andrewrk>
oh the irony
<andrewrk>
ok so another release blocker to file then
<mikdusan>
* The ``llvm.experimental.vector.reduce`` family of intrinsics have been renamed
<mikdusan>
to drop the "experimental" from the name, reflecting their now fully supported
<mikdusan>
status in the IR.
* mikdusan
bets money somehow the rename caused this
<mikdusan>
I guess you could file. It's easier for them to narrow down -- two different backends using instructions or functions it shouldn't be
notzmv has joined #zig
<mikdusan>
I think soon when stage2 is ready, we'll be able to add some performant tests that don't re-spawn zig. tests against -femit-llvm-ir and validate target triple (and data layout), and the like. -femit-ir or -femit-zir . command-line arg tests (without exec). cpu-features tests. should be exciting :)
brzg has quit [Quit: leaving]
<mikdusan>
1 million tests/s is the goal :P
<mikdusan>
on a single core
<mikdusan>
(too much? sorry)
<mikdusan>
btw for the last 3 days I've prettty much just been using zig built against llvm+release+assertions for everything on llvm12 and it performs quite nicely
<mikdusan>
and have llvm+debug on standby if needed
<daurnimator>
mikdusan: eh... if we added an test for every instruction.... 5 clock cycles per test seems possible ;)
<andrewrk>
mikdusan, yeah we can invest in the test harness, and have the same test suite for stage1/2, with test marked as "passing in stage1 only", "passing in stage2 only", and "passing in both stage1 and stage2". then the test harness can efficiently perform the respective invocations
<mikdusan>
andrewrk: re: commenting out @reduce for tests. basically usage is contained in test/stage1/behavior/vector.zig, one big test,
<mikdusan>
and we have a callsite in crypto/utils and multi_array uses it. but those do NOT use .Min or .Max which so far (and needs to be float) is where the issue(s) manifest
WilhelmVonWeiner has quit [Ping timeout: 276 seconds]
nycex has quit [Ping timeout: 268 seconds]
earnestly has quit [Ping timeout: 245 seconds]
<mikdusan>
andrewrk: #8132
<andrewrk>
thanks! I'll report the wasm bug tomorrow and meanwhile I will run the rest of the test suite
<mikdusan>
it's a race. let's see how far zig build test gets
<andrewrk>
you're running release with asserts?
<mikdusan>
no i can't for this because of that debug metainfo issue
<andrewrk>
yours will certainly win the race because I'm passing -Denable-qemu -Denable-foreign-glibc=/home/andy/Downloads/glibc/multi-2.32/install/glibcs
<mikdusan>
oh heh for sure
<mikdusan>
what's your take on #6408 - lemon says it has to do with way zig generates debug info. his comment was in irc inside of last 24 hours
<andrewrk>
the missing math functions is easy, we just need to copy paste some stuff into c.zig
knebulae has quit [Read error: Connection reset by peer]
_whitelogger has joined #zig
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
kbd has joined #zig
sord937 has joined #zig
hidayat has joined #zig
decentpenguin has quit [Quit: ZNC crashed or something]
decentpenguin has joined #zig
greeb has joined #zig
greeb has left #zig ["WeeChat 2.9"]
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
waleee-cl has quit [Quit: Connection closed for inactivity]
tnorth_ has joined #zig
kenran has joined #zig
xackus__ has joined #zig
cole-h has quit [Ping timeout: 264 seconds]
tnorth_ is now known as tnorth
<tnorth>
Hi. Is there a way to see an intermediate representation of the Zig code when the compile time stuff has been interpreted?
bitmapper has quit [Quit: Connection closed for inactivity]
<ikskuh>
yes, you can do that
<ikskuh>
--verbose-ir
craigo has quit [Ping timeout: 245 seconds]
TheLemonMan has joined #zig
<tnorth>
ikskuh: thanks, I get a bunch of stuff and then "TODO more ast renderingthread 107625 panic:Unable to dump stack trace: debug info stripped ".
<ikskuh>
huh
<ikskuh>
that's a thing i've never seen before
<ikskuh>
can you share the code?
<andrewrk>
tnorth, are you interested in this for the c++ implementation or the work-in-progress self-hosted compiler?
<andrewrk>
there are some tricks you can do to get less output. at this point it's more of a debug tool than anything
<TheLemonMan>
yo, got a patch ready for the AArch64 issue
<tnorth>
ikskuh: Just a doc example: https://zig.godbolt.org/z/r7j35b . Maybe I'm not running it right: zig run --verbose-ir example.zig
<tnorth>
andrewrk: I'm currently using the C++ implementation, but since the self-hosted compiler will eventually come, I'll be interested to try it as well
<ikskuh>
tnorth: ah, so it's a bug in the emit-ir?
<mikdusan>
yeah stage1 has had a `--verbose-ir` bug where it eventually hits a render bug or not-yet-implemented thing, and crash
<mikdusan>
the usual workaround is to reduce the code surface. like don't use test, don't use main, just use an export fn, and redefine global panic function.
<andrewrk>
g-w1, ah we did almost the same thing at hte same time. can you pull/rebase and check my work?
<g-w1>
ok
<andrewrk>
I think leaving entry.value is harmless, if a bit silly
<g-w1>
hmm, the diff is one line short. i think you are missing one more heres mine: https://clbin.com/5fgAa
<g-w1>
ah ok
LanceThePants has quit [Read error: Connection reset by peer]
LanceThePants has joined #zig
<andrewrk>
I'm beginning work on source location reform in stage2
<andrewrk>
this is a prereq to reworking zir memory layout
<g-w1>
ah, I have a reminder to my self to say that we only need a u32 for a src loc since max file size is 2 gb :)
kchambers has quit [Quit: WeeChat 3.0.1]
sjd has joined #zig
<andrewrk>
my plan is to (1) introduce type safety for source locations (2) make source locations inside a Decl relative to the decl's location, so we don't have to re-generate ZIR when a decl is unchanged but moves down in a file due to previous decls and (3) remove source locations from every ZIR instructions in favor of special-case instructions to set source loc