[PATCH] D42012: [GlobalISel][TableGen] Add support for SDNodeXForm

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 16:29:00 PST 2018


volkan marked an inline comment as done.
volkan added inline comments.


================
Comment at: lib/Target/AArch64/AArch64InstructionSelector.cpp:1531
+  assert(I.getOpcode() == TargetOpcode::G_CONSTANT && "Expected G_CONSTANT");
+  auto CstVal = getConstantVRegVal(I.getOperand(0).getReg(), MRI);
+  assert(CstVal && "Expected constant value");
----------------
qcolombet wrote:
> Could you put the explicit type here?
> 
> In particular, this pattern looks strange:
> auto CstVal
> *CstVal;
> 
> At least, I would expect something along those lines:
> auto *CstVal
> *CstVal;
> 
It's because `getConstantVRegVal` returns `Optional<int64_t>`, I replaced `auto` with that. Also, I replaced `*CstVal` with `CstVal.getValue()`.


https://reviews.llvm.org/D42012





More information about the llvm-commits mailing list