<cwabbott>
rellla: yes, there's already a nir_opt_undef for things like this but it's kinda incomplete unfortunately
<rellla>
that's why i asked. i tried to lower that special instr set above, but i've noticed that i first have to learn nir a bit better :)
<rellla>
imho lowering undef to 0.0 is wrong and can have side effects. for example if the above is changed to "ssa1 = feq(ssa0, 0.0)" it's simply wrong ...
<cwabbott>
no, it's not wrong
<cwabbott>
it would lower that to "ssa1 = feq(0.0, 1.0)"
<rellla>
cwabbott: i mean, if the above would be : "ssa0 = undefined; ssa1 = feq(ssa0, 0.0); ssa2 = bcsel(ssa1, ssa3, ssa4)" it would be wrong, if undef is lowered to 0.0 and there is a comparision with 0.0 afterwards
<cwabbott>
again, no it wouldn't
<cwabbott>
we can return whatever we want for undef, and if it's read multiple times we can return a different result each time
<rellla>
hm, not sure if we talk past each other :p
<rellla>
otherwise i simply don't understand it :)
<rellla>
if we take alyssas approach and lower all undefs to const 0.0 -> suppose i have sth like "ssa0 = undefined; ssa1 = feq(ssa0, 0.0);" -> after const lowering we have "ssa0 = const 0.0; ssa1 = feq(ssa0, 0.0);"
<rellla>
so in my understanding, we get 2 different results in the end - for the case with just keeping the undef and for the case lowering it to const 0.0
<rellla>
but i could be wrong for sure
<cwabbott>
with undef, we're allowed to assume that it returns whatever we want
<cwabbott>
i.e. we're allowed to produce whatever result we want
<cwabbott>
exactly as if you have an uninitialized value in C
<rellla>
i think i move on to understand. the term "lowering undef to 0.0" isn't wrong, because we are allowed to do that. so the approach per se isn't wrong at all.
<rellla>
then it's just a matter to handle the things in a right order. meaning, first lower down the instructions which are affected by the undef within nir and then handle the remaining ones later - in case they have not been sorted out before.
<rellla>
i wonder, if undefs are worth the effort at all :)
megi has joined #lima
Da_Coynul has joined #lima
Da_Coynul has quit [Client Quit]
adjtm_ has quit [*.net *.split]
mrueg has quit [*.net *.split]
paulk-leonov has quit [*.net *.split]
marvs has quit [*.net *.split]
maciejjo has quit [*.net *.split]
griffinp- has quit [*.net *.split]
bhoj has quit [*.net *.split]
glisse has quit [*.net *.split]
gcl has quit [*.net *.split]
anarsoul has quit [*.net *.split]
ente has quit [*.net *.split]
dri-logger has quit [*.net *.split]
hellsenberg has quit [*.net *.split]
marvs has joined #lima
paulk-leonov has joined #lima
marvs has quit [Changing host]
marvs has joined #lima
maciejjo has joined #lima
glisse_ has joined #lima
griffinp has joined #lima
mrueg has joined #lima
adjtm has joined #lima
anarsoul has joined #lima
hellsenberg has joined #lima
Da_Coynul has joined #lima
bhoj has joined #lima
gcl has joined #lima
dri-logger has joined #lima
ente has joined #lima
Da_Coynul has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
kaspter has quit [Read error: Connection reset by peer]
kaspter has joined #lima
jrmuizel has joined #lima
jrmuizel has quit [Remote host closed the connection]
jrmuizel has joined #lima
megi has quit [Ping timeout: 258 seconds]
jrmuizel has quit [Remote host closed the connection]
glisse_ is now known as glisse
<rellla>
yeah, have added my first case with feq/bcsel undefs added to nir_opt_undef and it works :)
<rellla>
need to cleanup and think about how i should do that without breaking anything :p
chewitt has joined #lima
jrmuizel has joined #lima
Barada has quit [Quit: Barada]
hoijui has joined #lima
megi has joined #lima
dddddd has joined #lima
drod has joined #lima
chewitt has quit [Remote host closed the connection]
hoijui has quit [Quit: Leaving]
kaspter has quit [Quit: kaspter]
drod has quit [Ping timeout: 246 seconds]
drod has joined #lima
kaspter has joined #lima
adjtm has quit [Ping timeout: 244 seconds]
Wizzup has quit [Ping timeout: 245 seconds]
Wizzup has joined #lima
adjtm has joined #lima
kaspter has quit [Quit: kaspter]
camus has joined #lima
camus is now known as kaspter
kaspter has quit [Quit: kaspter]
Da_Coynul has joined #lima
Da_Coynul has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
jrmuizel has quit [Remote host closed the connection]
Da_Coynul has joined #lima
Da_Coynul has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]