Question: I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example):

```
mov x8, xzr

```

I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://community.arm.com/processors/f/discussions/3185/wzr-xzr-register-s-purpose) stating that it was, in many contexts, synonymous with zero.

So it looks like `x8` is being initialised to zero, which makes sense because it's executed just before a loop where `x8` is used as the loop counter.

What I don't understand is, why wasn't the literal `0` used instead of `xzr`? For example:

```
mov x8, 0

```

To summarise, my question is: why might one use the `xzr` register instead of the literal `0` here?

Answer: 
I think the `mov x8, xzr` vs `mov x8, #0` comparison is something of a red herring.

As @old\_timer's answer shows, there is no encoding gain to be made, and quite likely (although admittedly I haven't checked) little or no pipeline performance gain.

What `xzr` gives us, however - in addition to a dummy register as per @InfinitelyManic's answer - is access to a zero-valued operand *without having to load and occupy a real register*. This has the dual benefit of one less instruction, and one more register available to hold 'real' data.

I think this is an important characteristic that the original ['some content from ARM' referred to in the OP](https://community.arm.com/processors/f/discussions/3185/wzr-xzr-register-s-purpose) neglects to point out.

That's what I mean by `mov x8, xzr` vs `mov x8, #0` being a red herring. If we're zeroing `x8` with the intention of then modifying it, then using `xzr` or `#0` is pretty arbitrary (although I'd tend to favour `#0` as the more obvious). But if we're zeroing `x8` purely in order to supply a zero operand to a subsequent instruction, then we'd be better off using - where permitted - `xzr` instead of `x8` as the operand in *that* instruction, and not zeroing `x8` at all.
This answer is not "on all fours" to the OP. 

XZR could be used to discard results; e.g., "ldr xzr, [sp], 16". See GDB below

```
0x7fffffef40:   0x00000000      0x00000000      0x00400498      0x00000000
0x7fffffef50:   0x00000000      0x00000000      0x00000000      0x00000000
              ldr x0,=0xdead
(gdb)
              ldr x1,=0xc0de
(gdb)
              stp x0, x1, [sp, #-16]!
(gdb) x/8x $sp
0x7fffffef30:   0x0000dead      0x00000000      0x0000c0de      0x00000000
0x7fffffef40:   0x00000000      0x00000000      0x00400498      0x00000000

              ldr xzr, [sp], #16
(gdb) x/8x $sp
0x7fffffef40:   0x00000000      0x00000000      0x00400498      0x00000000
0x7fffffef50:   0x00000000      0x00000000      0x00000000      0x00000000

```

Also remember that in ARMv8 the stack should be quad-word aligned or SP mod 16 = 0. 
So you may use XZR one of the "pushed" or "popped" pair registers.

```
stp x1, xzr, [sp, #-16]!

ldp x10, xzr, [sp], #16

```