[PATCH] D59635: [AArch64] NFC: Cleanup isAArch64FrameOffsetLegal
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 10:33:29 PDT 2019
paquette added inline comments.
================
Comment at: lib/Target/AArch64/AArch64InstrInfo.cpp:1719
+ switch (Opc) {
+ default: return 0;
+ case AArch64::PRFMui: return AArch64::PRFUMi;
----------------
sdesmalen wrote:
> paquette wrote:
> > Maybe this could use a better name? It's unintuitive to return 0 when the name seems to imply that you expect a scaled load/store opcode. I would expect this to be unreachable with the current name.
> I've used Optional<unsigned> to make it more clear to the caller that the value can be invalid. Do you think the name-change is still needed?
I think that the optional clears things up!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59635/new/
https://reviews.llvm.org/D59635
More information about the llvm-commits
mailing list