[PATCH] D99710: [AArch64] Use 64-bit movi for zeroing halfs/floats

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 1 03:27:18 PDT 2021


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp:1115
     }
-    MCInst MOVI;
-    MOVI.setOpcode(AArch64::MOVIv2d_ns);
-    MOVI.addOperand(MCOperand::createReg(DestReg));
     MOVI.addOperand(MCOperand::createImm(0));
     EmitToStreamer(*OutStreamer, MOVI);
----------------
david-arm wrote:
> Should this be moved to the `else` case? It looks like we're adding the same immediate twice for the H and S cases.
Thanks for taking a look. This movi variant takes an optional shift immediate value, so indeed for the H and S we need to add 0 immediates. That probably deserves a comment, so will add that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99710/new/

https://reviews.llvm.org/D99710



More information about the llvm-commits mailing list