[PATCH] D81383: [VE] Support lowering to NND instruction

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 05:58:06 PDT 2020


simoll added a comment.

Just one nit.



================
Comment at: llvm/lib/Target/VE/VEISelLowering.cpp:541-547
+  // VE allows different immediate values for X and Y where ~X & Y.
+  // Only simm7 works for X, and only mimm works for Y.  It doesn't match
+  // hasAndNot requirements, so return false for all immediate values now.
+  // FIXME: Change hasAndNot function to have two operands to work it
+  //        correctly with Aurora VE.
+  if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Y))
+    return false;
----------------
Why not `return true` for all scalar NANDs? Constants can always be pulled through registers if we cannot turn them into immediates.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81383





More information about the llvm-commits mailing list