We weren't performing this optimization on 16 and 32 bit stores. SDAG happily does this though.
e.g. https://godbolt.org/z/cWocKr
This saves about 0.2% in code size on CTMark at -O3.
| Paths 
 |  Differential  D84568  
[AArch64][GlobalISel] Use wzr/xzr for 16 and 32 bit stores of zero ClosedPublic Authored by paquette on Jul 24 2020, 5:06 PM. 
Details Summary We weren't performing this optimization on 16 and 32 bit stores. SDAG happily does this though. e.g. https://godbolt.org/z/cWocKr This saves about 0.2% in code size on CTMark at -O3. 
Diff Detail 
 Event TimelineThis revision is now accepted and ready to land.Jul 24 2020, 5:07 PM Closed by commit rGfcc55c0952f4: [AArch64][GlobalISel] Use wzr/xzr for 16 and 32 bit stores of zero (authored by paquette).  ·  Explain WhyJul 24 2020, 5:15 PM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 280628 llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
 llvm/test/CodeGen/AArch64/GlobalISel/select-store.mir
 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||