[PATCH] D77700: [VE] Simplify definitions of uimm6 and simm7

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 01:02:46 PDT 2020


simoll accepted this revision.
simoll added a comment.
This revision is now accepted and ready to land.

Thanks. LGTM.



================
Comment at: llvm/lib/Target/VE/VEInstrInfo.td:29
+def uimm6 : Operand<i32>, PatLeaf<(imm), [{
+    return isUInt<6>(N->getZExtValue()); }]>;
+
----------------
kaz7 wrote:
> simoll wrote:
> > How come there is a `DecoderMethod` for `simm7` but not for `uimm6`? I am not saying this is wrong but i'd like to understand why this works.
> We don't need decoder functions for unsigned values since the default decoder method works correctly for unsigned immediate values.  In order to sign-extend values, we need particular functions.
I see


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77700





More information about the llvm-commits mailing list