libera/#sbcl - IRC Chatlog
Search
17:05:03
karlosz
but this time was because i specified null-tn as an immediate-constant-sc in the same way arm64 does
17:05:38
karlosz
to be fair, the reason why it no longer gets selected is because move-if is basically just as cheap at that point, and just 1 byte longer, and no need for thread-tn
17:06:13
karlosz
i think that was the representation issue i ran into before using the arm64 way of doing null-sc
17:06:42
karlosz
i think there wouldn't be such an issue if you use null-sc, since you don't get those redundant moves and you have a bit more precise control over what vops select what
17:07:05
karlosz
the underlying issue is probably that compute-from-flags only takes immediate and constant scs, bu
17:07:24
karlosz
when null is made a descriptor-reg with a wired offset, the vop probably doesnt know what to do
17:07:58
karlosz
or maybe it just decides that loading null-tn into the argument and then doing move-if with that redundant argument is better
17:08:20
karlosz
i need to understand representation selection a bit better to avoid issues like this
17:08:50
karlosz
pretty sure the original mips way of doing things avoided stuff like making load-tns for null-tn
18:21:21
karlosz
ah, so the issue is that constant-tn-p doesn't understand that null-tn is a constant
18:25:31
karlosz
stassats: do you know how to get rid of the redundant move here, or is it impossible? r12 holds null-tn. https://pastebin.com/a17fmVX7
19:39:10
stassats
i have 2: MOVE-IF/DESCRIPTOR t8[R0] :NORMAL DESCRIPTOR-REG T t12[NULL] :COMPONENT DESCRIPTOR-REG LIST {(:EQ)} => t13[R0] :NORMAL DESCRIPTOR-REG T
19:46:40
karlosz
true, but it seems unrelated to the issue at hand, since the problem seems to be at the vop level, right?
19:53:19
stassats
i also didn't do the multi-flag option right, but arm64 doesn't have any, so it's under a rag at the moment
19:57:22
stassats
i hadn't done move-if on arm64 previously because then it pessimized cbz/cbnz (branch if zero), but with the instcombine pass it's no longer an issue
19:59:44
stassats
but i really want a real code model for peephole optimization, which registers definitions are available, maybe which constant values are where